-
1. Re: working with large result sets with CMP
dsundstrom Sep 6, 2002 6:03 PM (in response to vivek.chaudhri)It really depends. All JBoss really needs in the collection is the primary key of the object and all the other datadta can be loaded on demand. You will have to try the code and see how it works for you.
-
2. Re: working with large result sets with CMP
vivek.chaudhri Sep 7, 2002 2:35 PM (in response to vivek.chaudhri)Thanks for the response. I dont see any why to do operations like previous. I know I can do things like next. How do I support scrolling like operations with CMP. Will I have to bypass CMP and use straight JDBC for operations that return large result sets.
Thanks for all your help.
Vivek -
3. Re: working with large result sets with CMP
jcordes Sep 9, 2002 5:49 AM (in response to vivek.chaudhri)Hi Vivek!
I think your problem could be solved by implementing the ValueListHandler-Pattern (see J2EE patterns catalog provided by Sun). Essentially this means caching your data either on the server-side or client-side. If you prefer server-side (thus avoiding unnecessary network-traffic), consider using a stateful session-bean, which returns a collection and iterator providing the funcionality that suits your needs.
Hope it helps,
Jochen.
P.S.: I'll have to implement this feature soon, especially for search-results. So don't hesitate to contact me. -
4. Re: working with large result sets with CMP
dsundstrom Sep 9, 2002 5:07 PM (in response to vivek.chaudhri)> Thanks for the response. I dont see any why to do
> operations like previous. I know I can do things like
> next. How do I support scrolling like operations with
> CMP. Will I have to bypass CMP and use straight JDBC
> for operations that return large result sets.
You just get a collection by searching for the rows with a finder, ejbSelect or relationship collection (set read-ahead to none). Then you have a collection you can copy into an ArrayList and iterate over (forwards and backwards).