4.3.2.3 Stop Method and Endpoint Activation

The stop method is called when a resource instance is undeployed, during application server shutdown, or when the last composite referring to the adapter is terminated.

public void stop()

If active endpoints exist, they must be deactivated before returning from the stop() method, invoked by the adapter framework during server or composite shutdown.

Any other allocated resources must similarly be released promptly:

public void endpointActivation(MessageEndpointFactory endpointFactory,
       ActivationSpec spec)

Endpoint activation is called during the activation of a message endpoint.

Each composite that has an initiating or non-initiating JCA-based Service entry point (that is, an entry point using binding.jca in the <service>) causes the invocation of endpointActivation() for each associated (inbound) operation for the ResourceAdapter referenced by the connection factory JNDI in the .jca property file.