Show TOC Start of Content Area

Background documentation Deploying the MDB  Locate the document in its SAP Library structure

...

       1.      In the Developer Studio go to the J2EE Explorer view, expand the MDBEnterprise tree structure and select the EAR file MDBEnterprise.ear.

       2.      Open the context menu and choose Deploy to J2EE engine.

       3.      Enter the SDM password, if required.

The system displays a message to inform you that the deployment process has finished successfully.

Deploying the Message Driven Bean

To deploy the message driven bean from the Developer Studio, you have to create the assembly and the enterprise projects in the usual way and define the configurations for the:

      Destination the bean will use

      JMS Factory the connections are obtained from.

This information is stored in the descriptors in the J2EE-compliant ejb-jar.xml of your assembly project you specify the destination type (in our case it is javax.jms.Queue) the message driven bean uses:

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

<ejb-jar>

   <description>

      EJB JAR description

   </description>

   <display-name>

      EJB JAR

   </display-name>

   <enterprise-beans>

      <message-driven>

         <ejb-name>

            MDBEjbBean

         </ejb-name>

         <ejb-class>

            com.sap.jms.test.MDBEjbBean

         </ejb-class>

         <transaction-type>

            Container

         </transaction-type>

         <message-driven-destination>

            <destination-type>

               javax.jms.Queue

            </destination-type>

         </message-driven-destination>

      </message-driven>

   </enterprise-beans>

</ejb-jar>

In the vendor-specific descriptor ejb-j2ee-engine.xml you specify the actual connection factory used:

<!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">

<ejb-j2ee-engine>

   <enterprise-beans>

      <enterprise-bean>

         <ejb-name>

            MDBEjbBean

         </ejb-name>

         <message-props>

            <destination-name>

               JMSTestDestination

            </destination-name>

            <connection-factory-name>

               QueueConnFactory

            </connection-factory-name>

         </message-props>

      </enterprise-bean>

   </enterprise-beans>

</ejb-j2ee-engine>

Next Step

Running the Example

End of Content Area