Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Example to write MDB Application  RSS feed

 
yekkala krishna
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I written small application which is used to send and receive messages by using JMS.
Now i want to convert that applicatin into MDB.Could you suggest how to do this
Or you can give me a sample application on MDB.Which will help to solve my issue.

Thanks in advance

 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Have your MessageListener class implement the MessageDrivenBean interface.
2. Remove all your bootstrap logic (which includes looking up the connectionfactory/destination etc)
3. Specify some info (Destincation type, acknowledge mode etc) in a ejb-jar.xml file.
4. Specify other info (Connection Factory JNDI name, Destincation JNDI Name etc) in server specific files. For example in weblogic you would do that in weblogic-ejb-jar.xml and in another deployment file which ends with a .jms extension.
5. Deploy the bean in your server

ram.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!