-
1. Re: a strange error of SQL generated by CMP
gavinandrews May 10, 2004 6:31 AM (in response to cold_lin)I found similar behaviour... JBOSS was generating very large OR clauses in a SQL query and blowing the Sybase limits... I solved the problem by putting the loadAll into a loadGroup and restricting the pageSize.
Hope that helps.
Regards,
Gavin -
2. Re: a strange error of SQL generated by CMP
cold_lin May 10, 2004 6:38 AM (in response to cold_lin)
> I solved the problem by putting the loadAll into a loadGroup and restricting the pageSize.
Could you please tell me how to do that?
Thanks a lot!
PS: anyone has other suggestion? -
3. Re: a strange error of SQL generated by CMP
sesques May 10, 2004 6:44 AM (in response to cold_lin)Hi,
Look at all the earlier topics in the same forum about read-ahead page-size. This limits the number of beans loaded in one shot. You don't need a LoadGroup
Pascal -
4. Re: a strange error of SQL generated by CMP
cold_lin May 10, 2004 6:53 AM (in response to cold_lin)Search found 150 matches about read-ahead AND page-size
:(
Still very thanks.
I will find it out... -
5. Re: a strange error of SQL generated by CMP
gavinandrews May 10, 2004 7:07 AM (in response to cold_lin)all I did was...
* @jboss.query signature="Collection findAll()"
* description="Use Read-Ahead for Enumeration Request"
* strategy="on-find"
* page-size="128"
* eager-load-group="allBorisOrder"
It's the page-size that is significant... I guess I added the load-group as I was in that part of the documentation at that time!
Regards,
Gavin
PS
If you don't use XDoclet you will find these tags in jbosscmp-jdbc.xml in <read-ahead> -
6. Re: a strange error of SQL generated by CMP
cold_lin May 10, 2004 9:23 AM (in response to cold_lin)Thank you Gavin,
It works!
Actually, I found these tags are already in stantardjbosscmp-jdbc.xml.
As I am using lomboz, it generate a local jbosscmp-jdbc.xml file which missed these tags.
Thanks again. -
7. Re: a strange error of SQL generated by CMP
cold_lin May 10, 2004 10:05 AM (in response to cold_lin)As my jbosscmp-jdbc.xml is generated from XDoclet.xml
Anyone know how and where to put the read-ahead tags?
thanks -
8. Re: a strange error of SQL generated by CMP
sesques May 10, 2004 2:44 PM (in response to cold_lin)Look at the XDoclet documentation :
http://xdoclet.sourceforge.net/xdoclet/tags/jboss-tags.html#@jboss_persistence__0__1_
For the whole entity bean (declare it in the header)@jboss.read-ahead strategy="on-find" page-size=<what you want>
or you can use it with
@jboss.declared-sql and @jboss.query defined with @ejb.finder
Pascal