I am aware that a JDBC RowSet instance can be created with a Connection object passed to its constructor, eg.:
Connection con = MyDAO.getConnection();
JdbcRowSet jrs = new JdbcRowSetImpl(con);
Two questions:
- My Java SE 7 complains every single time I build my project that contains any uses of JdbcRowSetImpl. It says that JdbcRowSetImpl is a vendor specific implementation and that it may be removed from a future version of the JDK. I find this odd if only because the Java Tutorial continues to use JdbcRowSetImpl in its JDBC section. Does Oracle really intend for the factory RowSet implementations to be phased out of the JDK? If not, is there a way to stop the warning messages?
Here's one of the warnings. It occurs when I try to use a JdbcRowSet constructor in the code or when I try to import the package
C:\Users\Ribose\Documents\NetBeansProjects\CensusAssistant\src\org\kls\md\censusassistant\db\DB.java:170:
warning: JdbcRowSetImpl is internal proprietary API and may be removed in a future release
jrs = new JdbcRowSetImpl(con);
I am building with NetBeans IDE 7.3. The RDBMS is HSQLDB 2.2.9. I have the latest JDK SE 7.
- Let's say that I already have an instance of JdbcRowSet. Although it is not connected, I already have a Connection object, but no access to the authentication credentials, i.e. I have the object, but no user_id or password needed to make a new Connection.
Am I able to use the existing Connection object with the existing JdbcRowSet instance? The only thing I have found is that the constructor for JdbcRowSetImpl can take a Connection object, but I want to use the Connection without having to construct a new RowSet object. Is this possible?