In the process of developing a Java EE application in any particular Message Driven Bean, you have to perform several tasks.
You need to create an EJB project, where you set up the message driven bean. You also create an Enterprise Application Project (EAR) and the JMS resources xml, where you declare the connection factories and the destinations needed for the application. The jms-resources.xml has to be included in the EAR.
Deploying the EAR file will result in the automatic deployment of all JMS resources defined in the jms-resources.xml file. The XML file will be packaged in the EAR file. Put this XML file under the META-INF directory.
- From the META-INF context menu of the MDBEar, choose New, Other, then XML. Choose Next.
- Choose Create XML file from an XML schema file and then Next.
- Specify the Project, in our example MDBEar, and the META-INF, where you will create the jms-resources.xml and choose Next.
- Choose Select XML Catalog entry and select the jms-resources.xsd schema. Choose Next.
- Choose Finish.
Implementing the configuration
Requires Free Membership to View
When you register, you will start receiving targeted emails from my award-winning team of editorial writers. Our goal is to keep you informed on the hottest topics and biggest challenges faced by SAP professionals today.
Hannah Smalltree, Editorial DirectorXML Schema file
To implement the configuration XML Schema file, navigate to META-INF in your Enterprise Application Project and open the jms-resources.xml file. One of the portions of this file sets up
the connection factory and the destination.
Here is how my descriptor looks after adding manually the JMS resources. First, you have to declare the <connection-factory> tag, and afterwards the definition of the destinations.
- For Queue destination:
- For Topic destination:
Afterward, you can continue developing and deploying your Java EE Application.
For more information, refer to: