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

Discussion in 'Java' started by Christian U. Ullenboom, Apr 11, 2005.

  1. 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
    Christian U. Ullenboom, Apr 11, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Forrest Samuels

    Jetty and http to https redirect

    Forrest Samuels, Dec 4, 2004, in forum: Java
    Replies:
    1
    Views:
    4,045
    Steve Sobol
    Dec 5, 2004
  2. Jesus M. Salvo Jr.
    Replies:
    2
    Views:
    4,155
    robert
    Feb 11, 2006
  3. Replies:
    0
    Views:
    529
  4. alex
    Replies:
    0
    Views:
    386
  5. Brian Madden MD
    Replies:
    1
    Views:
    208
    hemant
    Sep 1, 2007
Loading...

Share This Page