8.3.7 Message delivery
The following steps describe the sequence of events that occur when a message arrives at a destination:
1. The resource adapter detects the arrival of a message at the destination.
2. The resource adapter invokes the createEndpoint method on the MessageEndpointFactory.
3. The MessageEndpointFactory obtains a reference to a message endpoint. This might be an unused message endpoint obtained from a pool or, if no message endpoints are available, it can create a new message endpoint.
4. The MessageEndpointFactory returns a proxy to this message endpoint instance to the resource adapter.
5. The resource adapter uses the message endpoint proxy to deliver the message to the message endpoint. This process is shown in Figure 8-12.
Figure 8-12 Delivering a message to a message endpoint