Joe Pluta skrev den 06-06-2008 17:42:
Since JDBC 3.0 allows for moving both back and forth in a resultset (this is from memory, so the names may be different) I would use plain SQL over JDBC and put the resultset in the session bean along with a counter stating the current row number so paging is possible. It should be trivially simple, but I'll need to do a quick and dirty test to see if it actually is so :)
As far as I know, scrollable resultsets cannot be placed in stateless session beans.

Please, try it out. Let us know.
This turned out to be both an interesting exercise and a learning experience regarding different . It is not a problem to store a scrollable resultset as a session attribute in JSP and navigate back and forth with a PostgreSQL database on OpenSolaris so that was working nicely.

It then turned out that the PostgreSQL JDBC driver loads the complete resultset in memory when needing to be able to page back and forth, which was the whole idea to avoid so that was an unpleasant surprise having 11 million rows in my testset. So now I've learned that not all JDBC-drivers are created equal :)

After looking at the jtOpen version 5.0 code it appears that this is only possible for V5R3 and above, and it appears that this will be implemented with cursors as I expected (but the code is quite hard to read).

I will give it a try when I have time again and see how it performs against the i. It takes a while to load the dataset...


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.