In the process of developing a Java EE application in any particular Message Driven Bean, you have to perform several...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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 XML 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:
Ekaterina Anachkova is an information developer at SAP Labs Bulgaria.
This content is reposted from the SAP Developer Network.
Copyright 2007, SAP Developer Network
SAP Developer Network (SDN) is an active online community where ABAP, Java, .NET, and other cutting-edge technologies converge to form a resource and collaboration channel for SAP developers, consultants, integrators, and business analysts. SDN hosts a technical library, expert blogs, exclusive downloads and code samples, an extensive eLearning catalog, and active, moderated discussion forums. SDN membership is free.