public XAConnection getXAConnection ( ) throws SQLException { // Comment out before public release: System . err . print ( "Executing " + getClass ( ) . getName ( ) + ".getXAConnection()..." ) ; try { Class . forName ( driver ) . newInstance ( ) ; } catch ( ClassNotFoundException e ) { throw new SQLException ( "Error opening connection: " + e . getMessage ( ) ) ; } catch ( IllegalAccessException e ) { throw new SQLException ( "Error opening connection: " + e . getMessage ( ) ) ; } catch ( InstantiationException e ) { throw new SQLException ( "Error opening connection: " + e . getMessage ( ) ) ; } JDBCConnection connection = ( JDBCConnection ) DriverManager . getConnection ( url , connProperties ) ; // Comment out before public release: System . err . print ( "New phys: " + connection ) ; JDBCXAResource xaResource = new JDBCXAResource ( connection , this ) ; JDBCXAConnectionWrapper xaWrapper = new JDBCXAConnectionWrapper ( connection , xaResource , connectionDefaults ) ; JDBCXAConnection xaConnection = new JDBCXAConnection ( xaWrapper , xaResource ) ; xaWrapper . setPooledConnection ( xaConnection ) ; return xaConnection ; }
Get new PHYSICAL connection to be managed by a connection manager .