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.
> 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?
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
Search found 150 matches about read-ahead AND page-size
Still very thanks.
I will find it out...
all I did was...
* @jboss.query signature="Collection findAll()"
* description="Use Read-Ahead for Enumeration Request"
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!
If you don't use XDoclet you will find these tags in jbosscmp-jdbc.xml in <read-ahead>
Thank you Gavin,
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.
As my jbosscmp-jdbc.xml is generated from XDoclet.xml
Anyone know how and where to put the read-ahead tags?
Look at the XDoclet documentation :
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