I have just found RowSets for database querying with JDBC. They are stateless and cacheable, they look to be superior to ResultSets.
Can PreparedStatements be used with them though? PreparedStatements are a performance booster for querying very large databases, and not something I would want to give up (before something is said, this is not premature optimization, we have a proven speed need!!). I need the fastest query return to a set here, caching is secondary.
Asked
Active
Viewed 1,046 times
2

WolfmanDragon
- 7,851
- 14
- 49
- 61
1 Answers
1
The default implementation of RowSet use prepared statements internally.
I would have been surprised if that was not the case.
See the code JDBCRowSetImpl code your self http://www.google.com/codesearch/p?hl=en#TTY8xLpnKOE/src/share/classes/com/sun/rowset/JdbcRowSetImpl.java&q=JDBCRowSetImpl
you will want to look at prepare() method.
Note: Poking around the code is why i love Open Source :D

TRF
- 548
- 1
- 5
- 7
-
Thanks. clears up some issues, but the link you have is for java7, unreleased code. I do not think there is to be any changes to the JDBC package. Just to let you know. – WolfmanDragon Dec 27 '08 at 22:21