The ResourceAdapter implementation is instantiated when the first composite application using the adapter is started.
Subsequent starting composites that also use the same adapter do not cause additional ResourceAdapter
instances to be created, but obtain a handle to the first (singleton) instance.
The following method is called immediately after the ResourceAdapter
instance is created:
public void start(BootstrapContext ctx) throws ResourceAdapterInternalException
The adapter should cache the BootstrapContext
, as it contains necessary facilities for creating and scheduling inbound endpoint interactions.
The BootstrapContext
also contains a Logging service handle, which the resource adapter should cache and use throughout all classes supporting inbound message flow (that is. classes provided under javax.resource.spi.*
).
Outbound, the Logging service handle will be available through the ConnectionFactory.