Methods Summary |
---|
public javax.resource.spi.ManagedConnection | createManagedConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cxRequestInfo)Creates a new physical connection to the underlying EIS resource
manager.
_logger = LogDomains.getLogger(LogDomains.RSR_LOGGER);
if (logWriter != null) {
logWriter.println("In createManagedConnection");
}
PasswordCredential pc = SecurityUtils.getPasswordCredential(this, subject, cxRequestInfo);
javax.sql.XADataSource dataSource = getDataSource();
javax.sql.XAConnection xaConn = null;
try {
/* For the case where the user/passwd of the connection pool is
* equal to the PasswordCredential for the connection request
* get a connection from this pool directly.
* for all other conditions go create a new connection
*/
if (isEqual(pc, getUser(), getPassword())) {
xaConn = dataSource.getXAConnection();
} else {
xaConn = dataSource.getXAConnection(pc.getUserName(),
new String(pc.getPassword()));
}
} catch (java.sql.SQLException sqle) {
//_logger.log(Level.WARNING, "jdbc.exc_create_xa_conn",sqle);
_logger.log(Level.FINE, "jdbc.exc_create_xa_conn", sqle);
StringManager sm = StringManager.getManager(
DataSourceObjectBuilder.class);
String msg = sm.getString("jdbc.cannot_allocate_connection", sqle.getMessage());
throw new ResourceAllocationException(msg, sqle);
}
com.sun.gjc.spi.ManagedConnection mc = constructManagedConnection(
xaConn, null, pc, this);
mc.initializeConnectionType(ManagedConnection.ISXACONNECTION);
//GJCINT
validateAndSetIsolation(mc);
return mc;
|
public boolean | equals(java.lang.Object other)Check if this ManagedConnectionFactory is equal to
another ManagedConnectionFactory .
if (logWriter != null) {
logWriter.println("In equals");
}
/**
* The check below means that two ManagedConnectionFactory objects are equal
* if and only if their properties are the same.
*/
if (other instanceof com.sun.gjc.spi.XAManagedConnectionFactory) {
com.sun.gjc.spi.XAManagedConnectionFactory otherMCF =
(com.sun.gjc.spi.XAManagedConnectionFactory) other;
return this.spec.equals(otherMCF.spec);
}
return false;
|
public javax.sql.XADataSource | getDataSource()Returns the underlying datasource
if (xaDataSourceObj == null) {
try {
xaDataSourceObj = (javax.sql.XADataSource) super.getDataSource();
} catch (ClassCastException cce) {
_logger.log(Level.SEVERE, "jdbc.exc_cce_XA", cce);
throw new ResourceException(cce.getMessage());
}
}
return xaDataSourceObj;
|
public java.lang.String | getInitialPoolSize()Gets the initial pool size.
return spec.getDetail(DataSourceSpec.INITIALPOOLSIZE);
|
public java.lang.String | getMaxIdleTime()Gets the maximum idle time.
return spec.getDetail(DataSourceSpec.MAXIDLETIME);
|
public java.lang.String | getMaxPoolSize()Gets the maximum pool size.
return spec.getDetail(DataSourceSpec.MAXPOOLSIZE);
|
public java.lang.String | getMaxStatements()Gets the max statements.
return spec.getDetail(DataSourceSpec.MAXSTATEMENTS);
|
public java.lang.String | getMinPoolSize()Gets the minimum pool size.
return spec.getDetail(DataSourceSpec.MINPOOLSIZE);
|
public java.lang.String | getPropertyCycle()Gets the property cycle.
return spec.getDetail(DataSourceSpec.PROPERTYCYCLE);
|
public void | setInitialPoolSize(java.lang.String initPoolSz)Sets the initial pool size.
spec.setDetail(DataSourceSpec.INITIALPOOLSIZE, initPoolSz);
|
public void | setMaxIdleTime(java.lang.String maxIdleTime)Sets the maximum idle time.
spec.setDetail(DataSourceSpec.MAXIDLETIME, maxIdleTime);
|
public void | setMaxPoolSize(java.lang.String maxPoolSz)Sets the maximum pool size.
spec.setDetail(DataSourceSpec.MAXPOOLSIZE, maxPoolSz);
|
public void | setMaxStatements(java.lang.String maxStmts)Sets the max statements.
spec.setDetail(DataSourceSpec.MAXSTATEMENTS, maxStmts);
|
public void | setMinPoolSize(java.lang.String minPoolSz)Sets the minimum pool size.
spec.setDetail(DataSourceSpec.MINPOOLSIZE, minPoolSz);
|
public void | setPropertyCycle(java.lang.String propCycle)Sets the property cycle.
spec.setDetail(DataSourceSpec.PROPERTYCYCLE, propCycle);
|