Thanks Scott,

I don't think this will help though. I need to ensure that the dataset hasn't changed during invocations of the call, and I don't think that
using multiple calls to this query (to iterate through the WHOLE dataset) will guarantee that - even WITH a SELECT FOR UPDATE, as another insert or update may slip in while jboss is loading up the beans (read-ahead strategy or not).


If the CMP engine used a scrollable cursor or something like that, it would be ideal.

I suspect that I will have to use raw JDBC from a session bean like Eric has suggested. I was just hoping for some magic which might have alleviated the pain. :-)


Russ



Scott M Stark wrote:
Use the jboss-ql limit offset feature if your db supports it.

ejb-jar.xml:
      <query>
         <query-method>
            <method-name>findWithLimitOffset</method-name>
            <method-params>
               <method-param>int</method-param>
               <method-param>int</method-param>
            </method-params>
         </query-method>
         <ejb-ql><!-- define in jbosscmp --></ejb-ql>
      </query>

jbosscmp-jdbc.xml:
<query>
<query-method>
<method-name>findWithLimitOffset</method-name>
<method-params>
<method-param>int</method-param>
<method-param>int</method-param>
</method-params>
</query-method>
<jboss-ql>SELECT OBJECT(o) FROM OrderX o OFFSET ?1 LIMIT ?2</jboss-ql>
</query>



-- -- Russell Chan, Navaho Networks Inc. 416 542 1590 x108



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to