Here are the 2 modified files (the servlet and the transport (which is doing
nothing :) ) 
As i' m not an expert into web dev nor in AMQ (just playing with it since a
few days) , i think this can be improved a lot.

Regards
 


Dejan Bosanac wrote:
> 
> Hi Thierry,
> 
> there's already opened enhancement request in Jira for that,
> https://issues.apache.org/activemq/browse/AMQ-2469. Any submitted
> patches are appreciated.
> 
> Cheers
> --
> Dejan Bosanac - http://twitter.com/dejanb
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
> 
> 
> On Sat, Dec 5, 2009 at 1:50 AM, Thierry H <thierry.ha...@gmail.com> wrote:
>>
>> 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.
>>
>>
> 
> 
> -----
> Dejan Bosanac
> 
> Open Source Integration - http://fusesource.com/
> ActiveMQ in Action - http://www.manning.com/snyder/
> Blog - http://www.nighttale.net
> 
http://old.nabble.com/file/p26676219/HttpExternalEmbeddedTunnelServlet.java
HttpExternalEmbeddedTunnelServlet.java 
http://old.nabble.com/file/p26676219/HttpExternalTransportServer.java
HttpExternalTransportServer.java 
-- 
View this message in context: 
http://old.nabble.com/Another-need-for-integrating-embedded-broker-into-Tomcat-tp26651812p26676219.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to