File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Dynamically or programmatically assigning Message-driven bean (MDB) destinations without rebuilding Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Dynamically or programmatically assigning Message-driven bean (MDB) destinations without rebuilding" Watch "Dynamically or programmatically assigning Message-driven bean (MDB) destinations without rebuilding" New topic
Author

Dynamically or programmatically assigning Message-driven bean (MDB) destinations without rebuilding

Kevin Halk
Greenhorn

Joined: Feb 09, 2010
Posts: 10
I've created code for an MDB to listen to a particular JMS destination.

The tricky part is that the same MDB is required to listen to multiple JMS destinations, which may not be known at the time the application is deployed. This means that we require the ability to add MDB instances to listen to new destinations (without rebuilding the jar/ear file)

I am able to accomplish this by deploying one MDB per JMS destination using an ejb-jar.xml file inside the MDB jar. As they are packaged in a jar/ear, these files won't be accessible to the end user for configuration.

As such, I require some way to deploy or configure the MDBs outside of the jar package.

I've tried to accomplish this using the following methods

- XML deployment descriptors outside the ear/jar (can't find how to reference the EJB which is already deployed inside the jar file)
- programmatically creating and deploying the MDBs (can't find how to configure or deploy an MDB - this could potentially occur within the ear/jar)

How can I achieve it?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Dynamically or programmatically assigning Message-driven bean (MDB) destinations without rebuilding
 
Similar Threads
Mapping MDB JMS references to different queues using descriptors
Queue not a JMSDestination error on startup
MDB and JMS
doubts with MDB as topic subscriber
Disable deploying MDB in ear file in Jboss