In our project, we want to provide page by page iteraor to client on records in our database. The number of records in database may be millions.
We want to know whether or not it is possible to use CMP entity beans (not JDBC) to model the record so that the transactions can still be managed by the container (each client may insert/delete records during their iterating)? We didn't find iterating support from EJBQL so don't know how to config the findByXxx method to support the iterating.
millions of records and u want to use entity beans....
I would rethink this strategy especially if as the data is not Read Only.
Do let me know what u decided and on what grounds....
Looks like we have no choice but to use stateful session bean and jdbc. The reason is jdbc resultset api provide page iterating support which is efficient.
I was wondering whether or not this is a common pattern (large number of records, client may change them during iterating) and someone may already wrote some code to support this generic changeable iterating feature.
I think you shall use the session bean to access DB directly instead of CMP to have Page iterator. Based on the selection made by user, maybe you could know the primary key to using CMP for updating.