FileDocCategorySizeDatePackage
NoTxConnectorAllocator.javaAPI DocGlassfish v2 API6315Thu Jul 19 03:02:58 BST 2007com.sun.enterprise.resource

NoTxConnectorAllocator

public class NoTxConnectorAllocator extends AbstractConnectorAllocator
author
Tony Ng

Fields Summary
Constructors Summary
public NoTxConnectorAllocator(com.sun.enterprise.PoolManager poolMgr, ManagedConnectionFactory mcf, ResourceSpec spec, Subject subject, ConnectionRequestInfo reqInfo, ClientSecurityInfo info, com.sun.enterprise.deployment.ConnectorDescriptor desc)

        super(poolMgr, mcf, spec, subject, reqInfo, info, desc);
    
Methods Summary
public ResourceHandlecreateResource()

        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) {
            _logger.log(Level.SEVERE,"poolmgr.create_resource_error",ex);
            
            if (ex.getLinkedException() != null) {
                _logger.log(Level.SEVERE,"poolmgr.create_resource_error",ex.getLinkedException());
            }
            Log.err.flush();
            throw new PoolingException(ex);
        }
    
public voiddestroyResource(ResourceHandle resource)

        
        try {
            ManagedConnection mc = (ManagedConnection) resource.getResource();
            mc.destroy();
        } catch (Exception ex) {
            _logger.log(Level.WARNING, ex.getMessage());
            throw new PoolingException(ex);
        }
    
public voidfillInResourceObjects(ResourceHandle resource)

        try {
            ManagedConnection mc = (ManagedConnection) resource.getResource();
            Object con = mc.getConnection(subject, reqInfo);
            resource.fillInResourceObjects(con, null);
        } catch (ResourceException ex) {
            throw new PoolingException(ex);
        }
    
public booleanisTransactional()

        return false;