XPooledConnection ret = null; if ( getTransactionalResource () == null ) throw new IllegalStateException ( "XAConnectionFactory: no tx resource" ); if ( getUserName () == null || getUserName ().equals ( "" ) ) { conn = getXADataSource ().getXAConnection (); } else { conn = getXADataSource ().getXAConnection ( getUserName (), getPassword () ); getTransactionalResource (), getLogWriter () ); } else { ret = new ExclusiveExternalXAPooledConnectionImp ( conn, getTransactionalResource (), getLogWriter () );
/** * @see javax.sql.ConnectionPoolDataSource#getPooledConnection() */ public PooledConnection getPooledConnection () throws SQLException { // This is meant for external third party pools, so // don't go through the pool: we don't want to use our // pooling and risk that there are two pools managing // the same connection return fact_.getPooledConnection (); }
XAConnectionFactory factory = new XAConnectionFactory ( resourceName_, "", "", xads_, xidFactory ); factory.setExclusive ( exclusive_ ); ds_ = new JtaDataSourceImp ( factory, poolSize_, connectionTimeout_, validation, !validation, validatingQuery_ , testOnBorrow_ );
public void setLoginTimeout ( int secs ) throws SQLException { getXADataSource ().setLoginTimeout ( secs ); } }
testQuery , testOnBorrow ); resource_ = fact.getTransactionalResource (); autoRegister_ = registerWithTM; if ( !allowDuplicateNames )
XAConnectionFactory factory = new XAConnectionFactory ( resourceName_, "", "", xads_, xidFactory ); factory.setExclusive ( exclusive_ );
public void setLogWriter ( PrintWriter pw ) throws SQLException { getXADataSource ().setLogWriter ( pw ); }
public PrintWriter getLogWriter () throws SQLException { return getXADataSource ().getLogWriter (); }
public int getLoginTimeout () throws SQLException { return getXADataSource ().getLoginTimeout (); }