Methods Summary |
---|
protected void | bindConnectionFactory()Bind the connection factory into jndi
InitialContext ctx = initialContext;
try
{
Name name = ctx.getNameParser("").parse(jndiName);
String key = name.toString();
if( true == true && name.size() > 1 )
{
int size = name.size() - 1;
Util.createSubcontext(initialContext, name.getPrefix(size));
}
NonSerializableFactory.rebind(initialContext, key, datasource);
log.info("Bound datasource to JNDI name '" + jndiName + "'");
}
catch (NamingException ne)
{
throw new DeploymentException("Could not bind ConnectionFactory into jndi: " + jndiName, ne);
}
finally
{
ctx.close();
}
|
public int | getBlockingTimeout()
return poolParams.blockingTimeout;
|
public java.lang.String | getCheckValidConnectionSQL()
return mcf.getCheckValidConnectionSQL();
|
public java.lang.String | getConnectionURL()
return mcf.getConnectionURL();
|
public java.lang.Object | getDatasource()
return datasource;
|
public java.lang.String | getDriverClass()
return mcf.getDriverClass();
|
public java.lang.String | getExceptionSorterClassName()
return mcf.getExceptionSorterClassName();
|
public long | getIdleTimeout()
return poolParams.idleTimeout;
|
public java.lang.String | getJndiName()
return jndiName;
|
public int | getMaxSize()
return poolParams.maxSize;
|
public int | getMinSize()
return poolParams.minSize;
|
public java.lang.String | getNewConnectionSQL()
return mcf.getNewConnectionSQL();
|
public int | getPreparedStatementCacheSize()
return mcf.getPreparedStatementCacheSize();
|
public boolean | getSharePreparedStatements()
return mcf.getSharePreparedStatements();
|
public java.lang.String | getTrackStatements()
return mcf.getTrackStatements();
|
public java.lang.String | getTransactionIsolation()
return mcf.getTransactionIsolation();
|
public javax.transaction.TransactionManager | getTransactionManager()
return transactionManager;
|
public boolean | getTxQueryTimeout()
return mcf.isTransactionQueryTimeout();
|
public java.lang.String | getValidConnectionCheckerClassName()
return mcf.getValidConnectionCheckerClassName();
|
public void | setBlockingTimeout(int blockingTimeout)
poolParams.blockingTimeout = blockingTimeout;
|
public void | setCachedConnectionManager(org.jboss.resource.connectionmanager.CachedConnectionManagerReference cachedConnectionManager)
this.cachedConnectionManager = cachedConnectionManager.getCachedConnectionManager();
|
public void | setCheckValidConnectionSQL(java.lang.String checkValidConnectionSQL)
mcf.setCheckValidConnectionSQL(checkValidConnectionSQL);
|
public void | setConnectionURL(java.lang.String connectionURL)
mcf.setConnectionURL(connectionURL);
|
public void | setDriverClass(java.lang.String driverClass)
mcf.setDriverClass(driverClass);
|
public void | setExceptionSorterClassName(java.lang.String exceptionSorterClassName)
mcf.setExceptionSorterClassName(exceptionSorterClassName);
|
public void | setIdleTimeout(long idleTimeout)
poolParams.idleTimeout = idleTimeout;
|
public void | setInitialContextProperties(java.util.Hashtable initialContextProperties)
this.initialContextProperties = initialContextProperties;
|
public void | setJndiName(java.lang.String jndiName)
this.jndiName = jndiName;
|
public void | setMaxSize(int maxSize)
poolParams.maxSize = maxSize;
|
public void | setMinSize(int minSize)
poolParams.minSize = minSize;
|
public void | setNewConnectionSQL(java.lang.String newConnectionSQL)
mcf.setNewConnectionSQL(newConnectionSQL);
|
public void | setPassword(java.lang.String password)
mcf.setPassword(password);
|
public void | setPreparedStatementCacheSize(int size)
mcf.setPreparedStatementCacheSize(size);
|
public void | setSharePreparedStatements(boolean sharePS)
mcf.setSharePreparedStatements(sharePS);
|
public void | setTrackStatements(java.lang.String value)
mcf.setTrackStatements(value);
|
public void | setTransactionIsolation(java.lang.String transactionIsolation)
mcf.setTransactionIsolation(transactionIsolation);
|
public void | setTransactionManager(javax.transaction.TransactionManager transactionManager)
this.transactionManager = transactionManager;
|
public void | setTxQueryTimeout(boolean qt)
mcf.setTransactionQueryTimeout(qt);
|
public void | setUserName(java.lang.String userName)
mcf.setUserName(userName);
|
public void | setValidConnectionCheckerClassName(java.lang.String value)
mcf.setValidConnectionCheckerClassName(value);
|
public void | start()
if (initialContextProperties == null) initialContext = new InitialContext();
else initialContext = new InitialContext(initialContextProperties);
connectionManager = new TxConnectionManager(cachedConnectionManager, pool, transactionManager);
connectionManager.setLocalTransactions(true);
connectionManager.setTrackConnectionByTx(true);
pool.setConnectionListenerFactory(connectionManager);
datasource = connectionManager.getPoolingStrategy().getManagedConnectionFactory().createConnectionFactory(new ConnectionManagerDelegate());
bindConnectionFactory();
|
protected void | unbindConnectionFactory()
InitialContext ctx = initialContext;
try
{
ctx.unbind(jndiName);
NonSerializableFactory.unbind(jndiName);
log.info("Unbound datasource for JNDI name '" + jndiName + "'");
}
catch (NamingException ne)
{
log.error("Could not unbind datasource from jndi: " + jndiName, ne);
}
finally
{
ctx.close();
}
|