private synchronized void checkSetup () throws SQLException { checkSetup ( false ); }
checkSetup ( true ); String query = getValidatingQuery (); if ( query == null || query.equals ( "" ) ) return;
ds_ = JtaDataSourceImp.getInstance ( getUniqueResourceName () ); return; if ( xads_ == null && getDataSourceName ().equals ( "" ) ) throw new SQLException ( "DataSourceBean: xaDataSource not set." ); if ( xidFactory_ == null ) throw new SQLException ( "DataSourceBean: xidFormat not set." ); if ( !validation && !getDataSourceName ().equals ( "" ) ) { xads_ = (XADataSource) envCtx.lookup ( getDataSourceName () ); } catch ( Exception e ) {
public Reference getReference () throws NamingException { return JtaDataSourceImp.createReference ( getUniqueResourceName () ); }
public TransactionalResource getTransactionalResource () { try { checkSetup (); } catch ( SQLException err ) { err.printStackTrace (); throw new RuntimeException ( err.getMessage () ); } return ds_.getTransactionalResource (); }
public Connection getConnection ( String user , String passwd , String msg ) throws SQLException { checkSetup (); return ds_.getConnection ( user, passwd, msg ); }
public Connection getConnection () throws SQLException { checkSetup (); return ds_.getConnection (); }
public Connection getConnection ( String user , String pw , HeuristicMessage msg ) throws SQLException { checkSetup (); return ds_.getConnection ( user, pw, msg ); }
public void setLogWriter ( PrintWriter out ) throws SQLException { checkSetup (); ds_.setLogWriter ( out ); }
public Connection getConnection ( HeuristicMessage msg ) throws SQLException { checkSetup (); return ds_.getConnection ( msg ); }
public int getLoginTimeout () throws SQLException { checkSetup (); return ds_.getLoginTimeout (); }
public void setLoginTimeout ( int seconds ) throws SQLException { checkSetup (); ds_.setLoginTimeout ( seconds ); }
public Connection getConnection ( String user , String pw ) throws SQLException { checkSetup (); return ds_.getConnection ( user, pw ); }
public PrintWriter getLogWriter () throws SQLException { checkSetup (); return ds_.getLogWriter (); }
public Connection getConnection ( String msg ) throws SQLException { checkSetup (); return ds_.getConnection ( msg ); }