I am trying to understand the internal workings of RowSet.
How does it set the properties data and create a connection?
RowSetFactory factory = RowSetProvider.newFactory();
JdbcRowSet jdbcRowSet = factory.createJdbcRowSet();
jdbcRowSet.setUrl( … );
jdbcRowSet.setUsername( … );
jdbcRowSet.setPassword( … );
jdbcRowSet.setCommand( … );
jdbcRowSet.execute();
The easiest way is to look at the default implementation
com.sun.rowset.JdbcRowSetImpl.This class has a method
connect()that establishes the connection.It does this in one of three ways:
java.sql.DriverManagerto establish a connection to that urlNo magic here, it does the same things that you would do if you were to open a connection yourself.