activemq-users mailing list archives

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

Hello
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
that.

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: 

1 
      - 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
activemq.xml 
           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 .......


2 
     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
TransportServerSupport.
        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.

Thanks.
 
 

   

-- 
View this message in context: http://old.nabble.com/Another-need-for-integrating-embedded-broker-into-Tomcat-tp26651812p26651812.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message