Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: broker start up in Tomcat

suchitha koneru

2007-07-27

Replies:

Thank you Len for the suggested approach . The web apps should be
abstracted from the procedure of starting the broker, otherwise I'll end up
adding a servlet context listener for every new web app added to our
application. If possible, Iam looking for a way , in which Tomcat would
start the broker without any involvement from web applications.


On 7/26/07, Len Popp <len.popp@(protected):
>
> Write a function in your shared lib that checks if Active MQ has been
> started yet, and starts it if not. Then, in each webapp add a
> ServletContextListener with a contextInitialized method that calls the
> aforementioned function. Thus, Active MQ will be initialized when the
> first webapp starts up, whichever it is.
> --
> Len
>
> On 7/26/07, suchitha koneru <suchithakoneru@(protected):
> > Hello Tomcat Users,
> >                 I am using Tomcat server 5.5.20 along with Java
> 1.6,
> > and Active MQ 4.1.1. There are two web applications A and B which
> > communicate via the active mq broker. Our application has a requirement
> of
> > starting the broker before any of the web apps. Where should I be
> placing
> > the code which starts the broker. I can create a jar file out of the
> code
> > and dependent libraries and place it in common/lib. How will I
> communicate
> > to Tomcat server that the broker has to be started during the
> server start
> > up process, before any of the web apps ? Any pointers in this regard ?
> >
> > thank you ,
> > Suchitha.
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@(protected)
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.