commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: [Messenger] Messenger Configuration and JBoss
Date Thu, 06 Mar 2003 07:38:01 GMT
 From: "Rademacher Tobias" <>
> Hi Folks,
> I want to use Messener to simpfifying usage of JMS in EJB-Struts
> Application.
> On the project file you mentioned an xml base deployment descriptor.
> First question:
> Is this decriptor necessary or can I configure the Factory inside the

You can use code (though I've never tried it yet); though one of the points
of Messenger is that the JMS configuration becomes a deployment option
rather than inside your application code. Though I don't see any reason why
you can't use Java code if you wish.

Right now the MessengerManager is a little container of Messenger instances
which are looked up by name. You could manually create a MessengerManager
and register Messenger instances as you wish - or just use your own
Messenger directly and not bother with the MessengerManager class.

> If yes where do I have it to place into my ear file that the appserver
> it in classpath.
> I have a ejb.jar module and a war file? currently both fireing jms message
> (but I'm sure in future only one will).
> Any ideas?

Putting Messenger.xml anywhere in the classpath will do the trick; or just
explicitly initialising Messenger in (say) a Servlet my getting the URL from
some location.

e.g. in a servlet you could do

    URL url = getServletContext().getResource("/WEB-INF/Messenger.xml");
    MessengerManager manager = MessengerManager.configure( url.toString() );

or do something similar in an EJB etc.

If you want to be able to hot deploy the servlet and ear independently, then
they should both have their own JMS connections & MessengerManager instance,
so that you can take down (say) the ear and the war keeps running etc.

> Seconde question:
> Will it work in jboss?

Absolutely. There's a sample JBoss configuration file in src/conf


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts

View raw message