Until today I was working with ResultSet when handling results from queries. But today I read a little about RowSet and CachedRowset and I realized they can serve my purposes better. While in all the examples I read where RowSet and CachedRowSet were referred to as object, when I tried it myself in my code I realized those are interfaces and in the examples they use some implementation of those interfaces.
Now my question is where do I find those implementations, and is there something official?
Do I need to download them or do they come with the JDK?


The implementations are JRE specific. Oracle (Sun) JRE comes with a bunch of implementations:
com.sun.rowset.JdbcRowSetImplcom.sun.rowset.CachedRowSetImplcom.sun.rowset.WebRowSetImplcom.sun.rowset.FilteredRowSetImplcom.sun.rowset.JoinRowSetImplIn Java 1.6 and before, you'd need to construct them yourself:
In Java 1.7 you can get them by a
javax.sql.rowsetfactory so that you're not dependent of underlying JRE implementation and that you can finetune the implementation of choice if necessary:It only doesn't provide a possibility to pass a
ResultSeton construction. Those implementations doesn't ship with the average JDBC driver (at least, MySQL and PostgreSQL have none). It's basically an extra (optional) layer over JDBC API as the package name prefixjavaxhints.Note that if you get that far by looking into rowsets, then you might want to consider to look into an ORM instead, such as Hibernate or JPA. They provide first/second level cache possibilities.
See also:
javax.sql.rowsetpackage summary