Search in sources :

Example 1 with XAResourceWrapper

use of com.sun.enterprise.resource.XAResourceWrapper in project Payara by payara.

the class BasicResourceAllocator method createResource.

public ResourceHandle createResource(XAResource xaResource) throws PoolingException {
    ResourceHandle resourceHandle = null;
    ResourceSpec spec = new ResourceSpec(JMS_RESOURCE_FACTORY, ResourceSpec.JMS);
    if (xaResource != null) {
        logger.logp(Level.FINEST, "BasicResourceAllocator", "createResource", "NOT NULL", xaResource);
        try {
            resourceHandle = new ResourceHandle(// no object present
            null, spec, this, null);
            if (logger.isLoggable(Level.FINEST)) {
                xaResource = new XAResourceWrapper(xaResource);
            }
            resourceHandle.fillInResourceObjects(null, xaResource);
        } catch (Exception e) {
            throw (PoolingException) (new PoolingException()).initCause(e);
        }
    } else {
        logger.logp(Level.FINEST, "BasicResourceAllocator", "createResource", "NULL");
    }
    return resourceHandle;
}
Also used : PoolingException(com.sun.appserv.connectors.internal.api.PoolingException) ResourceHandle(com.sun.enterprise.resource.ResourceHandle) ResourceSpec(com.sun.enterprise.resource.ResourceSpec) XAResourceWrapper(com.sun.enterprise.resource.XAResourceWrapper) PoolingException(com.sun.appserv.connectors.internal.api.PoolingException) ResourceException(javax.resource.ResourceException)

Aggregations

PoolingException (com.sun.appserv.connectors.internal.api.PoolingException)1 ResourceHandle (com.sun.enterprise.resource.ResourceHandle)1 ResourceSpec (com.sun.enterprise.resource.ResourceSpec)1 XAResourceWrapper (com.sun.enterprise.resource.XAResourceWrapper)1 ResourceException (javax.resource.ResourceException)1