hi, 
I'm using JBoss 3.2.4 (EJB CMP 2.0) and MySQL 4.0.17. I have to display a list of 
records from a database using a JSP, in a friendly way.

An easy solution would be a findAll (CMP) using an EJB QL query like :
<ejb-ql>SELECT OBJECT(a) FROM App a</ejb-ql>.
The result is a Collection with all the selected records from the database. 
This way might lead to an OutOfMemoyException because of the great number of records 
in the database.

I'd like to get a Collection from a "SELECT *" like query without loading all the 
stored 
elements from the database (a fetch by page in a way, using EJB CMP).

It is possible to fetch data from MySQL using the LIMIT clause :
'SELECT ... FROM ... LIMIT start, size', where start is the position of the first 
database record (eg 0) and size is the size of the page (eg 20). 

To bad for me I can't use it from a CMP entity because CMP 2.0 can't manage it(Error 
compiling EJB-QL statement) :(:( 

Any idea to help me solve this CMP problem is welcome.

Thanks 

Chris

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

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


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to