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.
if (logWriter != null) {
logWriter.println("In createManagedConnection");
}
PasswordCredential pc = SecurityUtils.getPasswordCredential(this, subject, cxRequestInfo);
javax.sql.ConnectionPoolDataSource dataSource = getDataSource();
javax.sql.PooledConnection cpConn = 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())) {
cpConn = dataSource.getPooledConnection();
} else {
cpConn = dataSource.getPooledConnection(pc.getUserName(),
new String(pc.getPassword()));
}
} catch (java.sql.SQLException sqle) {
//_logger.log(Level.SEVERE, "jdbc.exc_create_ds_conn",sqle);
_logger.log(Level.FINE, "jdbc.exc_create_ds_conn", sqle);
StringManager sm =
StringManager.getManager(DataSourceObjectBuilder.class);
String msg = sm.getString("jdbc.cannot_allocate_connection", sqle.getMessage());
ResourceAllocationException rae = new ResourceAllocationException(
msg, sqle);
throw rae;
}
com.sun.gjc.spi.ManagedConnection mc = constructManagedConnection(
cpConn, null, pc, this);
mc.initializeConnectionType(ManagedConnection.ISPOOLEDCONNECTION);
//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.CPManagedConnectionFactory) {
com.sun.gjc.spi.CPManagedConnectionFactory otherMCF =
(com.sun.gjc.spi.CPManagedConnectionFactory) other;
return this.spec.equals(otherMCF.spec);
}
return false;
|
public javax.sql.ConnectionPoolDataSource | getDataSource()Returns the underlying datasource
_logger = LogDomains.getLogger(LogDomains.RSR_LOGGER);
if (cpDataSourceObj == null) {
try {
cpDataSourceObj = (javax.sql.ConnectionPoolDataSource) super.getDataSource();
} catch (ClassCastException cce) {
_logger.log(Level.SEVERE, "jdbc.exc_cce_CP", cce);
throw new ResourceException(cce.getMessage());
}
}
return cpDataSourceObj;
|
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);
|