Hello,

I'm using JBoss 4.0.1 and MySQL 4.1.9.

I have two simular queries with the same read ahead strategy. But one is normal 
and the other is dynamic-ql. The first one I can see loads all data and related 
data from the result set in the read ahead cache. This is nice because that is 
what I expected from the left outer join.
But when the dynamic QL is executed only the data from the main EJB is loaded 
into the read ahead cache. When loading the beans all related parent beans are 
selected again from the database with a "load relation SQL" statement.
It seems that with dynamic-ql the CMP engine forgets that the related data is 
already selected from the database.

Is this a bug or do I not understand something with dynamic-ql?



  | <query>
  |     <query-method>
  |             <method-name>findByContractor</method-name>
  |             <method-params>
  |                     
<method-param>nl.vda.contractsys.j2ee.ejb.contractor.ContractorLocal</method-param>
  |             </method-params>
  |     </query-method>
  |     <read-ahead>
  |             <strategy>on-find</strategy>
  |             <eager-load-group>lite</eager-load-group>
  |             <left-join cmr-field="type" eager-load-group="all"></left-join>
  |             <left-join cmr-field="subject" 
eager-load-group="all"></left-join>
  |             <left-join cmr-field="durationPeriod" 
eager-load-group="all"></left-join>
  |             <left-join cmr-field="periodOfNoticePeriod" 
eager-load-group="all"></left-join>
  |     </read-ahead>
  | </query>
  | <query>
  |     <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>
  |             <strategy>on-find</strategy>
  |             <eager-load-group>lite</eager-load-group>
  |             <left-join cmr-field="type" eager-load-group="all"></left-join>
  |             <left-join cmr-field="subject" 
eager-load-group="all"></left-join>
  |             <left-join cmr-field="durationPeriod" 
eager-load-group="all"></left-join>
  |             <left-join cmr-field="periodOfNoticePeriod" 
eager-load-group="all"></left-join>
  |     </read-ahead>
  | </query>
  | 

Johan

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3867631#3867631

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3867631


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to