You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Erik Martino Hansen <er...@gmail.com> on 2010/07/30 17:00:22 UTC

Port sharing with servlet engine

Is it possible to let activemq share a port (80 or 8080) with a servlet
engine like Jetty or Tomcat? So that a single port on a single server serves
standard http requests and jms broker communication.

The examples I could find seems to assume that the activemq broker owns the
port.

If that is not possible could you point me to another protocol that let me
efficiently push messages from a web server to a java client. I have found
examples on java server to flex (blazeds), java server to html+javascript
(atmosphere) but not java server to java client.
-- 
View this message in context: http://old.nabble.com/Port-sharing-with-servlet-engine-tp29306994p29306994.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Port sharing with servlet engine

Posted by Alex Dean <ad...@meteostar.com>.
On Jul 30, 2010, at 10:00 AM, Erik Martino Hansen wrote:

>
> Is it possible to let activemq share a port (80 or 8080) with a  
> servlet
> engine like Jetty or Tomcat? So that a single port on a single  
> server serves
> standard http requests and jms broker communication.

You could put Apache on port 80, and have it proxy various requests  
back to either Tomcat or ActiveMQ based on which URL is requested.

Re: Port sharing with servlet engine

Posted by Erik Martino Hansen <er...@gmail.com>.
Is it possible to avoid the "Thread per HTTP connection" issue that normally
is a problem with long living connections?


Dejan Bosanac wrote:
> 
> you can also use REST API if you need to embed the broker in an
> existing web server
> 
> http://activemq.apache.org/rest.html
> 

-- 
View this message in context: http://old.nabble.com/Port-sharing-with-servlet-engine-tp29306994p29323662.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Port sharing with servlet engine

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you can also use REST API if you need to embed the broker in an
existing web server

http://activemq.apache.org/rest.html

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 Mon, Aug 2, 2010 at 9:36 AM, Erik Martino Hansen
<er...@gmail.com> wrote:
>
> I looked a bit more into it. The apache solution does not fit our product.
> But it seems to me that the new websocket+stomp feature in the upcoming
> activemq would make port sharing possible if activemq is embedded in the
> jetty instance and one uses a stomp+websocket client on the java client
> side. Right?
>
> Would it be possible to implement the native activemq protocol on top of a
> websocket to get all the activemq features. This will ensure that a service
> and activemq could hide behind a single port?
>
> /erik
>
>
> Erik Martino Hansen wrote:
>>
>> Is it possible to let activemq share a port (80 or 8080) with a servlet
>> engine like Jetty or Tomcat? So that a single port on a single server
>> serves standard http requests and jms broker communication.
>>
>> The examples I could find seems to assume that the activemq broker owns
>> the port.
>>
>> If that is not possible could you point me to another protocol that let me
>> efficiently push messages from a web server to a java client. I have found
>> examples on java server to flex (blazeds), java server to html+javascript
>> (atmosphere) but not java server to java client.
>>
>
> --
> View this message in context: http://old.nabble.com/Port-sharing-with-servlet-engine-tp29306994p29322673.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Port sharing with servlet engine

Posted by Erik Martino Hansen <er...@gmail.com>.
I looked a bit more into it. The apache solution does not fit our product.
But it seems to me that the new websocket+stomp feature in the upcoming
activemq would make port sharing possible if activemq is embedded in the
jetty instance and one uses a stomp+websocket client on the java client
side. Right?

Would it be possible to implement the native activemq protocol on top of a
websocket to get all the activemq features. This will ensure that a service
and activemq could hide behind a single port?

/erik 


Erik Martino Hansen wrote:
> 
> Is it possible to let activemq share a port (80 or 8080) with a servlet
> engine like Jetty or Tomcat? So that a single port on a single server
> serves standard http requests and jms broker communication.
> 
> The examples I could find seems to assume that the activemq broker owns
> the port.
> 
> If that is not possible could you point me to another protocol that let me
> efficiently push messages from a web server to a java client. I have found
> examples on java server to flex (blazeds), java server to html+javascript
> (atmosphere) but not java server to java client.
> 

-- 
View this message in context: http://old.nabble.com/Port-sharing-with-servlet-engine-tp29306994p29322673.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.