[jboss-user] [JBoss Getting Started Documentation] - Re: Regarding MessageDiveenBean Deployment

visolvejboss do-not-reply at jboss.com
Mon Jan 8 00:57:39 EST 2007


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);
  |  

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3998840#3998840

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3998840



More information about the jboss-user mailing list