ConnectorAllocatorpublic class ConnectorAllocator extends AbstractConnectorAllocator
Fields Summary |
---|
private boolean | shareable |
Constructors Summary |
---|
public ConnectorAllocator(com.sun.enterprise.PoolManager poolMgr, ManagedConnectionFactory mcf, ResourceSpec spec, Subject subject, ConnectionRequestInfo reqInfo, ClientSecurityInfo info, com.sun.enterprise.deployment.ConnectorDescriptor desc, boolean shareable)
super(poolMgr, mcf, spec, subject, reqInfo, info, desc);
this.shareable = shareable;
|
Methods Summary |
---|
public ResourceHandle | createResource()
try {
ManagedConnection mc =
mcf.createManagedConnection(subject, reqInfo);
ResourceHandle resource =
new ResourceHandle(mc, spec, this, info);
ConnectionEventListener l =
new ConnectionListenerImpl(resource);
mc.addConnectionEventListener(l);
return resource;
} catch (ResourceException ex) {
throw new PoolingException(ex);
}
| public void | destroyResource(ResourceHandle resource)
try {
closeUserConnection(resource);
} catch (Exception ex) {
// ignore error
}
try {
ManagedConnection mc = (ManagedConnection) resource.getResource();
mc.destroy();
} catch (Exception ex) {
_logger.log(Level.WARNING, ex.getMessage());
throw new PoolingException(ex);
}
| public void | fillInResourceObjects(ResourceHandle resource)
try {
ManagedConnection mc = (ManagedConnection) resource.getResource();
Object con = mc.getConnection( subject, reqInfo );
resource.incrementCount();
XAResource xares = mc.getXAResource();
resource.fillInResourceObjects(con, xares);
} catch( ResourceException ex ) {
throw new PoolingException( ex );
}
| public boolean | shareableWithinComponent()
return shareable;
|
|