You can use annotations to create application-specific connection factories and destinations for Java EE enterprise bean or web components.The resources you create in this way are visible only to the application for which you create them.Usually, container-managed transactions produce the most efficient and correct behavior.This tutorial does not provide any examples of bean-managed transactions. and How Does the JMS API Work with the Java EE Platform?The examples in Sending and Receiving Messages Using a Simple Web Application, Sending Messages from a Session Bean to an MDB, and Using an Entity to Join Messages from Two MDBs all use the annotation.The other JMS examples do not use these annotations.The main differences are the areas of resource management and transactions.
Any managed bean that contains Bean Validation annotations automatically gets validation constraints placed on the fields on a Java Server Faces application's web pages.A message-driven bean differs from an application client's message listener in the following ways.A message-driven bean never has a local or remote interface. A message-driven bean is similar in some ways to a stateless session bean: Its instances are relatively short-lived and retain no state for a specific client.To create a destination, use a Note: If your application contains one or more message-driven beans, you may want to place the annotation on one of the message-driven beans.
If you place the annotation on a sending component such as an application client, you need to specify the See the API documentation for details on these annotations.
This method contains the business logic that handles the processing of the message.