How can I use MessageEndPoint in JCA on a Java EE compatible server?

I am new to Java Connector Architecture (JCA) and Java Enterprise Edition (Java EE) in general. I've read the JCA 1.6 specs, but I'm not 100% getting everything.

So here are a few questions I have:

  • Is MessageEndPoint a link to an Enterprise Information System (EIS)? or is it an application on the server trying to use a message received from the EIS?
  • Should MessageEndPoint be a bean?
  • What does MessageEndPoint activation mean?

Can you show a simple example of MessageEndPoint working / deploying? I am testing this on WebSphere Application Server - Liberty profile

+3


source to share


1 answer


First, clarify some terms:

  • Outbound messages are where the message starts at the server (to be more precise, it was initiated from your application that you have on the server, WebSphere Liberty

    in this case) and ends at the EIS.
  • Incoming messages : The message starts with EIS and ends at the server.
  • The endpoint of a message at a common location where a message ends up sitting / receiving at a certain stage in its life cycle.

enter image description here

So with outbound communication, we refer to a situation where an application receives a connection to an external EIS and reads or writes data to it. With inbound communication, we refer to a situation where the Resource Adapter (RA) listens for events from an external EIS and calls in your application when such an event occurs.

Outgoing RA illustration enter image description here

Illustration of an incoming RA enter image description here

What does the MessageEndPoint mean in JCA?

The application server (for example:) WebSphere Liberty

provides MBeans of message endpoints to help you manage message delivery to your message driven beans that act as listeners on specific endpoints that are destinations and to manage EIS resources that are used by those message beans ... The message-driven beans that are deployed as message endpoints are not the same as the message-driven beans that are configured on the listener port. Message-driven beans that are used as message endpoints must be deployed using ActivationSpecification

that defined in the RA configuration for JCA (found in the file ra.xml

).



What does MessageEndPoint activation mean?

With message endpoint MBeans, you can activate and deactivate specific endpoints in your applications to ensure that messages are delivered only to listen to messages beans that interact with healthy EIS resources. This feature allows you to optimize the performance of your JMS applications in situations where an EIS resource is not performing as expected. Delivery of messages to an endpoint typically fails when the message listening bean that is listening invokes an operation against a resource that is not healthy. For example, a message provider that is a JCA-compliant inbound resource adapter might not deliver messages to an endpoint when its message-based bean tries to transact with a database server that is not responding.

Should MessageEndPoint be a bean?

Must. Otherwise, you will find yourself in a big mess by creating your own unconventional way of doing things that are primarily intended to follow the Java EE specification. Create message-driven beans to delegate processing of the business to another enterprise beans. Do not access EIS resources directly in the message-driven bean, but do so indirectly through the bean delegate.

Can you show a simple example of MessageEndPoint working / deploying?

Check out the second resource I share below for a helpful example.

Useful learning resources:

+6


source







All Articles