activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sL07 <>
Subject Re: WAR deployment confusion
Date Wed, 31 May 2006 23:57:16 GMT

Lucio Piccoli-2 wrote:
> 2) MessageConsumers 
> Deploying both the broker and the app inside a single WAR works OK.
> However
> since the client is a tight ass and using WLS express I can't use MDB. So
> I
> am trying to instantiate MessageConsumers inside a servlet. The servlet
> gets
> preloaded using the <load-on-startup> in the web.xml. However the servlet
> loads before the broker is loaded and it complains about the follow.
> It seems like the servlet instance is trying to create a broker is ready
> and
> complains badly.
> Is there a simple mechanism that allows POJO to be configured as
> MessageConsumers within a WebApp?

looking through the SpringBrokerContextListener code it seems that one can
create a new  ServletContextListener  class that can call the broker setup
and then initialise MessageConsumers.
This will ensure that the broker is started before creating queues.

Does this approach seem reasonable?

public class SpringBrokerContextListener implements ServletContextListener {


View this message in context:
Sent from the ActiveMQ - User forum at

View raw message