5 Replies Latest reply on Aug 13, 2002 2:59 AM by andi

    Problems using Page-SIze

    andi

      Hi,
      I need to use the page-size and I thought setting the page-size to 4 in the standardjbosscmp-jdbc.xml


      ...
      <read-ahead>
      on-load
      <page-size>4</page-size>
      <eager-load-group>*</eager-load-group>
      </read-ahead>
      ..


      will cause the following sql statement for each kind of select;

      SELECT id,name FROM customerejb WHERE (id=1) OR (id=2) OR (id=3) OR (id=4)

      but instead the select statement is

      SELECT id,name FROM customerejb WHERE (id=1) OR (id=2) OR (id=3) OR (id=4) OR (id=5) OR (id=6) OR (id=7) OR (id=8) OR (id=9) OR (id=10) OR (id=11) OR (id=12) OR (id=13) OR (id=14) OR (id=15) OR (id=16) OR (id=17) OR (id=18) OR (id=19) OR (id=20) OR (id=21) OR (id=22) OR (id=23) OR (id=24) OR (id=25) OR (id=26) OR (id=27) OR (id=28) OR (id=29) OR (id=30) OR (id=31) OR (id=32) OR (id=33) OR (id=34) OR (id=35) OR (id=36) OR (id=37) OR (id=38) OR (id=39) OR (id=40) OR (id=41) OR (id=42) OR (id=43) OR (id=44) OR (id=45) OR (id=46) OR (id=47) OR (id=48) OR (id=49) OR (id=50) OR (id=51) OR (id=52) OR (id=53) OR (id=54) OR (id=55) OR (id=56) OR (id=57) OR (id=58) OR (id=59) OR (id=60) OR (id=61) OR (id=62) OR (id=63) OR (id=64) OR (id=65) OR (id=66) OR (id=67) OR (id=68) OR (id=69) OR (id=70) OR (id=71) OR (id=72) OR (id=73) OR (id=74) OR (id=75)

      I thought changing the default section will change the strategy for all the find methods. I hope have not to create an ejb query entry for each query in the application, so that I have twice, one in the jbosscmp-jdbc.xml and one in the ejb-jar.xml

      If the solution is in the JBossCMP Tutorial, (which I have) I didn't find it. The examples on Page 48 only uses the page-size in combination with a query.

      Thx for your time and help.

      Andi

        • 1. Re: Problems using Page-SIze
          dsundstrom

          What version of JBoss are you using?

          • 2. Re: Problems using Page-SIze
            andi

            I use
            JBoss (MX MicroKernel) [3.0.1RC1 Date:200206291622]

            and JBoss (MX MicroKernel) [3.1.0alpha Date:200208061141] for looking up your source code to find the "bug?".

            In both servers this problem happens. I did a workaround in setting the default page-size in the default constructor of the JDBCReadAheadMetaData class, but this could only be a workaround for devoloping our ejbs, not to deploy them.

            Many thanks for your help and let me say you did a great job with the cmp!
            Best regards,
            Andi

            • 3. Re: Problems using Page-SIze
              andi

              Should in JDBCReadAheadMetaData the default value not be overwritten if there is a new value in the standardjbosscmp-jdbc.xml default section?
              And I tried to use an EJB specific jbosscmp-jdbc.xml with readahead-values for the EJBs, but this doesn' t work either.
              The files are read in correctly, I logged the constructor calls in the JDBCReadAheadMetaData class, and every xml is parsed and a new JDBCReadAheadMetaData instance is created.
              but for all the findermethods the JDBCQueryMetaDataFactory.createJDBCQueryMetaData(QueryMetaData queryData) method is used and this one uses the
              JDBCQlQueryMetaData(QueryMetaData queryMetaData, Method method) constructor which uses JDBCReadAheadMetaData.DEFAULT as readahead value and this one is the fix value in the class and not a value read in from an xml file.

              I hope I understood your code right and thanks for your help!
              Best regards,
              Andi

              • 4. Re: Problems using Page-SIze
                dsundstrom

                Can you post this in a detailed bug report at sourceforge?

                • 5. Re: Problems using Page-SIze
                  andi

                  Sure, I will do it right now.
                  Bye,
                  Andi