Getting ActiveMQ over HTTP (Tunnel) with HttpEmbeddedTunnelServlet and Jetty to work

  • Thread starter Christian U. Ullenboom
  • Start date
C

Christian U. Ullenboom

Hallo out in the world,

I try to find out the way HttpTunnelServlet/HttpEmbeddedTunnelServlet
work. I hope I understand starting jetty 5 with the ActiveMQ broker
right.

HttpServer server = new HttpServer();
server.addListener( ":8080" );
HttpContext context = server.getContext( "/" );
ServletHandler handler= new ServletHandler();
handler.addServlet( "jms", "/jms/*",
HttpEmbeddedTunnelServlet.class.getName() );
// handler.addServlet( "/*",
HttpEmbeddedTunnelServlet.class.getName() );
context.addHandler( handler );
server.start();

JOptionPane.showMessageDialog( null, "Stop server." );
server.stop();

For the examples in ToolSupport.java I changed naive the following
line:

protected String url = "http://localhost:8080/jms";

But this was not crowned with success:

Caught: javax.jms.JMSException: Failed to post packet:
WIRE_FORMAT_INFO: id = 1 WireFormatInfo{ version = 1 } as response
was: 500
at org.codehaus.activemq.transport.http.HttpTransportChannel.asyncSend(HttpTransportChannel.java:62)
at org.codehaus.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:917)
at org.codehaus.activemq.ActiveMQConnection.asyncSendPacket(ActiveMQConnection.java:896)
at org.codehaus.activemq.ActiveMQConnection.checkClosed(ActiveMQConnection.java:615)
at org.codehaus.activemq.ActiveMQConnection.start(ActiveMQConnection.java:479)
....

What's the recommended way to do?

Christian
 

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top