Skip to Content

In the process of developing Java EE application in 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.xmlhas

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.

Creating the JMS resources deployment descriptor

From +the META-INF +context menu of the +MDBEar, +choose

+New… +® +Other… ® XML…. +Choose Next.

image

 

0.1.

Choose +Create XML file from an XML schema file +and

then Next.

image

 

0.1. Specify the Project, in our example MDBEar, and the

META-INF, where you will create the

+jms-resources.xml +

and choose Next.

image

 

0.1.

Choose Select XML Catalog entry and select the jms-resources.xsd</b>

schema. Choose Next.

image

 

0.1.

Choose Finish.

image

 

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</b>

file. One of the portions of this file sets up <br> the connection factory and the destination. </p>

<p>!https://weblogs.sdn.sap.com/weblogs/images/251777150/image006.jpg|height=235|alt=image|width=576|src=https://weblogs.sdn.sap.com/weblogs/images/251777150/image006.jpg|border=0!</p>

<p> </p>

<p>Here is how my descriptor looks after adding manually the JMS resources, first you have to declare the <br> <connection-factory> tag, and afterwards

the definition of the destinations.</p>

</ol>

<ol type=a>

<li>For Queue

     destination:</li>

<p>!https://weblogs.sdn.sap.com/weblogs/images/251777150/image007.jpg|height=342|alt=image|width=577|src=https://weblogs.sdn.sap.com/weblogs/images/251777150/image007.jpg|border=0!</p>

<p> </p>

<p><li>For Topic destination:</li></p>

<p>!https://weblogs.sdn.sap.com/weblogs/images/251777150/image008.jpg|height=355|alt=image|width=575|src=https://weblogs.sdn.sap.com/weblogs/images/251777150/image008.jpg|border=0!</body>

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply