views:

97

answers:

1

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.

+1  A: 

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
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