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
I dont know ActiveMQ but I think you will have to allow any WebApp that
needs it, to start it, if its not already running I think you have 2
options, create a custom JNDI object or create a singleton start up object
in common/lib, here is an article
Thank you so much Johnny for the idea. We have two web apps A and B namely.
A is the front end of our application and B is the back end. Our application
is web based, so we have a lot of https requests coming from the browser. We
could have used a servlet for inter web app communication , but a
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,