This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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