Search in sources :

Example 1 with MDBActivationSpec

use of org.apache.cxf.jca.inbound.MDBActivationSpec in project cxf by apache.

the class ResourceAdapterImpl method endpointDeactivation.

public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) {
    if (!(as instanceof MDBActivationSpec)) {
        LOG.fine("Ignored unknown activation spec " + as);
        return;
    }
    MDBActivationSpec spec = (MDBActivationSpec) as;
    LOG.info("CXF resource adapter is deactivating " + spec.getDisplayName());
    InboundEndpoint endpoint = endpoints.remove(spec.getDisplayName());
    if (endpoint != null) {
        try {
            endpoint.shutdown();
        } catch (Exception e) {
            LOG.log(Level.WARNING, "Failed to stop endpoint " + spec.getDisplayName(), e);
        }
    }
}
Also used : InboundEndpoint(org.apache.cxf.jca.inbound.InboundEndpoint) MDBActivationSpec(org.apache.cxf.jca.inbound.MDBActivationSpec) ResourceException(javax.resource.ResourceException) ResourceAdapterInternalException(javax.resource.spi.ResourceAdapterInternalException) NotSupportedException(javax.resource.NotSupportedException)

Example 2 with MDBActivationSpec

use of org.apache.cxf.jca.inbound.MDBActivationSpec in project cxf by apache.

the class ResourceAdapterImpl method endpointActivation.

public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) throws ResourceException {
    if (!(as instanceof MDBActivationSpec)) {
        LOG.fine("Ignored unknown activation spec " + as);
        return;
    }
    MDBActivationSpec spec = (MDBActivationSpec) as;
    LOG.info("CXF resource adapter is activating " + spec.getDisplayName());
    Work work = new MDBActivationWork(spec, mef, endpoints);
    ctx.getWorkManager().scheduleWork(work);
}
Also used : MDBActivationSpec(org.apache.cxf.jca.inbound.MDBActivationSpec) MDBActivationWork(org.apache.cxf.jca.inbound.MDBActivationWork) MDBActivationWork(org.apache.cxf.jca.inbound.MDBActivationWork) Work(javax.resource.spi.work.Work)

Aggregations

MDBActivationSpec (org.apache.cxf.jca.inbound.MDBActivationSpec)2 NotSupportedException (javax.resource.NotSupportedException)1 ResourceException (javax.resource.ResourceException)1 ResourceAdapterInternalException (javax.resource.spi.ResourceAdapterInternalException)1 Work (javax.resource.spi.work.Work)1 InboundEndpoint (org.apache.cxf.jca.inbound.InboundEndpoint)1 MDBActivationWork (org.apache.cxf.jca.inbound.MDBActivationWork)1