Diagrams¶
The exchange of messages between the JEE container and a JEE Resource Adapter (RA) can seen complex at first glance.
Building on ideas inspired from a blog post written by Rafael Ribeiro I’ll try to gradually distill the JEE Container / RA / Application exchanges in simplified diagrams generated by an excellent open source diagramming tool called PlantUML.
RA State Transitions¶
Understanding all of the message exchanges with JCA Resource Adapters is complicated by the fact that a resource adapter transitions through several states during its life cycle, and each state can consist of several exchanges between the container and the RA as well as between the application and the RA.
The purpose of some of the APIs in the interfaces will also be easier to explain if we decompose the RA life cycle into discrete states.
The following diagram represents the state transitions a resource adapter makes as it is loaded, used, and unloaded by an active JEE container.
Deploying¶
When a resource adapter is first started by a JEE container it enters the deploying state.
During the deploying state the JEE container will invoke the resource adapter start( BootstrapContext )
method. The BootstrapContext instance contains a reference to the container managed WorkManager instance which allows
the RA to submit threads for execution in a container managed thread executor.
Deployment¶
Running¶