activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thierry H <>
Subject Another need for integrating embedded broker into Tomcat
Date Sat, 05 Dec 2009 00:50:33 GMT

I 'm trying to embed AMQ(5.3) into tomcat(6) with a simple WAR which is
containing the configuration files and all the JARs. I also want to use Http
Tunnel to avoid firewall issue ( so i' ll be using the tomcat port)

To do that i've tried to use the servlet (HttpSpringEmbeddedTunnelServlet) 
which isdelivered into the optional package and which seem to be done for

May be it's due to the fact that i'm just start to use AMQ but i was unable
to make them work without modification for following reasons: 

      - The servlet is using the BrokerFactoryBean -> XBeanBrokerService
which is starting automatically the broker.
      - Then adding the TransportConnector on a started broker is doing
nothing , and the HttpTunnelServlet cannot be initialised since the accept
listener is not set.

      => to avoid that i had to add start="false" into the broker tag of the
           This may be something usefull to have this into a documentation
to embed a broker :
             configure using a xml and the BrokerFactoryBean, then add what
you want to have programmatic-ally and then start the broker , but if you do
that .......

     The second part is about the HttpTransportServer which is  starting a
jetty server 
     But the Bind address which is used is the one already used by tomcat
     It was unable to start.
       => to avoid the problem i 've made a another HttpTransportServer
class which is doing nothing except what is done into the base class
        I also add to modify the HttpEmbeddedTunnelServlet , since the
context which is used to transmit information with its base class
(HttpTunnelServlet) is set to the wrong attribute (
"transportChannelListener" when the base class expect the value to be set on
the attribute "acceptListener" )

After doing thing all seems to work for now.

I may be totally wrong in my analysis and what i ve done . But if somebody
can confirm that , i ll be happy to give the modified classes and open the
associated ticket in Jira.



View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message