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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...