• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

JMS in JBOSS

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am a beginner in JMS.Could anyone give me a idea of how to implement a message driven bean in JBoss.More of the configuration part.Like where to set the JMS Queue?
Do we have to make any changes to JBoss?Does Jboss have any properties file?The problem I am facing occurs when I try to look up the JMS name.
I am attaching the content below.
Thanks in advance.
---------------------
1) ejb-jar.xml
<ejb-jar>
<display-name>SimpleMessageJAR</display-name>
<enterprise-beans>
<message-driven>
<display-name>SimpleMessageEJB</display-name>
<ejb-name>SimpleMessageEJB</ejb-name>
<ejb-class>samples.ejb.mdb.simple.ejb.SimpleMessageBean</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>
----------------------------------------
2) Client code to look up JMS
try {
queueConnectionFactory = (QueueConnectionFactory)
jndiContext.lookup
("java:comp/env/jms/MyQcf");
queue = (Queue)
jndiContext.lookup("java:comp/env/jms/MyQueue");
} catch (NamingException e) {
System.out.println("JNDI lookup failed: " +
e.toString());
System.exit(1);
}
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's how to configure Queues in JBoss. Below is an example file, you only need to copy it to the 'deploy' dir.
And I strongly advise you download a JBoss workbook for Monson-Haefel's EJB book from
many day-to-day tasks are described there.
everything else is pure EJB spec and is not related directly to JBoss.
 
Vinoo Macmillan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Andrew,
Thanks for the details.Shall get back with the results.Have a nice day.
 
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!