Hello folks,
I have a general question if it is possible to use pagination inside of an ejb2.
Taken the example of the book "Java Persistence with Hibernate" (p 618):
Code:
Query query =
session.createQuery("from User u order by u.name asc")
.setMaxResults(10);
Criteria crit =
session.createCriteria(User.class)
.addOrder( Order.asc("name") )
.setFirstResult(40)
.setMaxResults(20);
So we would use maxResults = 20. And we would like to retrieve 2000
datasets which would mean 100 calls to the ejb. Is something like that
possible? What one needs to do not to loose the transaction if it is AS
based? What needs to be configured ..
Thanks a lot