activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roman hawk <romanh...@gmail.com>
Subject Re: HTTP Tunneling for Embedded Broker
Date Thu, 29 Oct 2009 09:53:43 GMT

Hello, thanks for your response.

I've checked HttpEmbeddedTunnelServlet.

            if (broker == null) {
                broker = createBroker();

                // Add the servlet connector
                String url = getConnectorURL();
                transportConnector = new HttpTransportServer(new URI(url));
                broker.addConnector(transportConnector);

                String brokerURL =
getServletContext().getInitParameter("org.apache.activemq.brokerURL");
                if (brokerURL != null) {
                    log("Listening for internal communication on: " +
brokerURL);
                }
            }
            broker.start();

So HttpTransportServer is created for http://localhost/...
And then in HttpTransportServer new jetty server is started. So, I'm still
in the situation when 2 Http servers are running. One is mine (where I put
my Servlet), and another is embedded Jetty.




Dejan Bosanac wrote:
> 
> Hi,
> 
> did you check  HttpEmbeddedTunnelServlet and
> HttpSpringEmbeddedTunnelServlet? It might be what you're looking for.
> 
> 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 Thu, Oct 29, 2009 at 6:34 AM, roman hawk <romanhawk@gmail.com> wrote:
> 
>>
>> I've the following use case:
>> According to ActiveMQ docs and code, it is possible to open http
>> transport
>> from broker. Jetty server is started inside HttpTransportServer. Listener
>> from HttpTransportServer is registered in HttpTunnelServlet, which is
>> started inside Jetty.
>>
>> I have an embedded broker. It is running essentially inside my servlet
>> container. So I'd like to reuse my servlet container (thus port 80) to
>> open
>> HttpTunnel. So it looks like correct approach is to start
>> HttpTunnelServlet
>> inside my container. The only connection with broker is
>> TransportAcceptListener. I've obtained this listener from
>> VMTransportServer,
>> but I guess it is not the best approach (private field).
>>
>> What is the best approach from architecture perspective? Create my own
>> transport? Use some Transport filter? Or am I missing something?
>> --
>> View this message in context:
>> http://www.nabble.com/HTTP-Tunneling-for-Embedded-Broker-tp26107111p26107111.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
> 

-- 
View this message in context: http://www.nabble.com/HTTP-Tunneling-for-Embedded-Broker-tp26107111p26110103.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message