Show TOC Start of Content Area

Procedure documentation Configuring the JMS Resources  Locate the document in its SAP Library structure

Use

In this step you configure the jms-resources.xml where you declare the connection factories and destinations needed by the application. The jms-resources.xml is included in the EAR.

Deploying the EAR results in an automatic deployment of all JMS resources defined by the jms-resources.xml file. The XML file is packaged in the EAR.

Prerequisites

An EAR project exists.

Procedure

...

       1.      Expand the MDBEar project. Under META-INF folder there is a jms-resources.xml file. This XML file is automatically created when you create the EAR project.

       2.      Open the jms-resources.xml file and enter the following:

                            a.      For Queue destination:

<jms-resources>

   <connection-factory>

      <name>MyVeryNewFactory</name><!-- You give the name of the Connection Factory -->

      <sap-local-factory-type>

         <type>javax.jms.XAQueueConnectionFactory</type>

         <virtual-provider>default</virtual-provider>

      </sap-local-factory-type>

   </connection-factory>

   <destination>

      <name>MyVeryNewQueue</name><!-- Specify the Destination -->

      <type>javax.jms.Queue</type>

      <sap-local-destination-type>

         <virtual-provider>default</virtual-provider>

      </sap-local-destination-type>

   </destination>

</jms-resources>

                            b.      For Topic destination:

<jms-resources>

   <connection-factory>

      <name>MyVeryNewFactory</name><!-- You give the name of the Connection Factory -->

      <sap-local-factory-type>

         <type>javax.jms.XAQueueConnectionFactory</type>

         <virtual-provider>default</virtual-provider>

      </sap-local-factory-type>

   </connection-factory>

   <destination>

      <name>MyVeryNewTopic</name><!-- Specify the Destination -->

      <type>javax.jms.Topic</type>

      <sap-local-destination-type>

         <virtual-provider>default</virtual-provider>

      </sap-local-destination-type>

   </destination>

</jms-resources>

Result

You have configured the JMS resources in the jms-resources.xml.

Next Step

Deploying the EAR

End of Content Area