2 Replies Latest reply on Apr 26, 2005 11:15 AM by Christian Percy

    Optimizaed loading question

    Hideki Mae Newbie

      To all:
      System: JBoss 4.0, EJB 2.0
      On a customer's database I was testing out an EJB bean for a view. I noticed that the transaction was timing out because it took too long to get the data (there is about 4,000 records for the table). On the test servers where the data is smaller the beans work fine. I tried using load groups and on-load strategies introduced in the Administration document (Chapter 11). But that did not improve performance at all.
      I also tried using normal PreparedStatments instead of EJB and this took too long too.

      The following is a code snippet from my jbosscmp-jdbc.xml. Did I miss anything?

      <load-groups>
      <load-group>
      <load-group-name>basicweb</load-group-name>

      <field-name>status</field-name>
      <field-name>wireCenter</field-name>
      <field-name>utNum</field-name>
      <field-name>clliCode</field-name>
      <field-name>payback</field-name>
      <field-name>histCost</field-name>
      <field-name>trackUnit</field-name>
      </load-group>
      </load-groups>


      <query-method>
      <method-name>ejbSelectGeneric</method-name>
      <method-params>
      <method-param>java.lang.String</method-param>
      <method-param>java.lang.Object[]</method-param>
      </method-params>
      </query-method>
      <dynamic-ql />
      <read-ahead>
      on-load
      <page-size>100</page-size>
      <eager-load-group>basicweb</eager-load-group>
      </read-ahead>


      In my local test server the server log did indicate that the load group did get the primary key fields and the fields defined by the load group.


      Please let me know if I missed anything.

      Thank you.