2 Replies Latest reply on Jan 9, 2007 7:09 AM by vas_srinuin

    Regarding MessageDiveenBean Deployment

    vas_srinuin

      Hai to all,

      I am new to jboss.i getting problem while running MDB, any body cam help me the confiuguring MDB JNDI name,needed deploymnet descriptors for running MDB ,and also tell me
      how to set the INITIAL CONTEXT variables to run jms topic and queue on jboss

      Thanks & Regards,
      Srinivasu.k

        • 1. Re: Regarding MessageDiveenBean Deployment
          visolvejboss

          Hello,

          Add the following code in the ejb-jar.xml file in your application.

          <message-driven>
           <ejb-name>MDBNAME</ejb-name>
           <ejb-class>PACKAGENAME.MDBCLASS</ejb-class>
           <transaction-type>Container</transaction-type>
           <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
           <message-driven-destination>
           <destination-type>javax.jms.Queue</destination-type>
           <subscription-durability>NonDurable</subscription-durability>
           </message-driven-destination>
           </message-driven>
          


          Add the following code in jboss.xml file,

          <message-driven>
           <ejb-name>MDBNAME</ejb-name>
           <destination-jndi-name>queue/jndiname</destination-jndi-name>
           <depends>jboss.mq.destination:service=Queue,name=jndiname</depends>
           </message-driven>
          


          To set the initial context,

          Properties p = new Properties();
           p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
           p.put(Context.URL_PKG_PREFIXES, "jboss.naming:org.jnp.interfaces");
           p.put(Context.PROVIDER_URL, "localhost:1099");
          
           Context jndiContext = new InitialContext(p);
          


          • 2. Re: Regarding MessageDiveenBean Deployment
            vas_srinuin

            Thans for u'r guidence, my JMS Queue program is running. Is there any way to running jms Quee on jboss without using InitialContextFactory Name and Provider URL in InitialContext

            Regards,
            Srinivasu.k