/** * Init method to setup the bean for recovery * and other init stuff. * @throws SQLException * */ public void init() throws SQLException { checkSetup ( false ); }
private synchronized void checkSetup () throws SQLException { checkSetup ( false ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection () throws SQLException { checkSetup (); return ds_.getConnection (); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public void setLoginTimeout ( int seconds ) throws SQLException { checkSetup (); ds_.setLoginTimeout ( seconds ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public int getLoginTimeout () throws SQLException { checkSetup (); return ds_.getLoginTimeout (); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection ( String user , String pw ) throws SQLException { checkSetup (); return ds_.getConnection ( user, pw ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection ( HeuristicMessage msg ) throws SQLException { checkSetup (); return ds_.getConnection ( msg ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection ( String user , String pw , HeuristicMessage msg ) throws SQLException { checkSetup (); return ds_.getConnection ( user, pw, msg ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public void setLogWriter ( PrintWriter out ) throws SQLException { checkSetup (); ds_.setLogWriter ( out ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection ( String msg ) throws SQLException { checkSetup (); return ds_.getConnection ( msg ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public Connection getConnection ( String user , String passwd , String msg ) throws SQLException { checkSetup (); return ds_.getConnection ( user, passwd, msg ); }
/** * @see com.atomikos.jdbc.HeuristicDataSource */ public PrintWriter getLogWriter () throws SQLException { checkSetup (); return ds_.getLogWriter (); }
/** * Get the transactional resource. * * @return TransactionalResource The resource as it is used by the * transaction service during recovery. */ protected TransactionalResource getTransactionalResource () { try { checkSetup (); } catch ( SQLException err ) { err.printStackTrace (); throw new RuntimeException ( err.getMessage () ); } return ds_.getTransactionalResource (); }
checkSetup ( true ); String query = getValidatingQuery (); if ( query == null || query.equals ( "" ) )
/** * @see javax.sql.ConnectionPoolDataSource#getPooledConnection() */ public PooledConnection getPooledConnection () throws SQLException { checkSetup (); PooledConnection ret = null; XAConnection xaconn = xads_.getXAConnection (); ret = new ExternalXAPooledConnectionImp ( xaconn, getTransactionalResource (), getLogWriter () ); return ret; }
/** * @see javax.sql.ConnectionPoolDataSource#getPooledConnection(java.lang.String, * java.lang.String) */ public PooledConnection getPooledConnection ( String user , String pw ) throws SQLException { PooledConnection ret = null; checkSetup (); XAConnection xaconn = xads_.getXAConnection ( user, pw ); ret = new ExternalXAPooledConnectionImp ( xaconn, getTransactionalResource (), getLogWriter () ); return ret; }