activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cristisor <cristisor...@yahoo.com>
Subject Re: Using BlobMessage with ActiveMQ inside ServiceMix
Date Thu, 20 Jun 2013 08:22:58 GMT
I managed to deploy a component bean like this:
<beans xmlns:bean="http://servicemix.apache.org/bean/1.0">
  <bean:endpoint service="test:service" endpoint="endpoint"
bean="#jettyServer"/>
  <bean id="jettyServer" class="com.rs.sw.nec.JettyServer"/>
</beans>

and inside I start a Jetty server:
package com.rs.sw.nec;

import org.mortbay.jetty.bio.SocketConnector;
import org.mortbay.jetty.webapp.WebAppContext;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
import javax.annotation.PostConstruct;

/**
 * A simple bootstrap class for starting Jetty in your IDE using the local
web application.
 *
 * @version $Revision: 356269 $
 */
public class JettyServer {

    public static final int PORT = 8080;

    public static final String WEBAPP_DIR = "src/webapp";

    public static final String WEBAPP_CTX = "/";

    @PostConstruct
        public void main() throws Exception {
        int port = PORT;
        System.out.println("Starting Web Server on port: " + port);
        Server server = new Server();
        SocketConnector connector = new SocketConnector();
        connector.setPort(port);
        WebAppContext webapp = new WebAppContext();
        webapp.setContextPath(WEBAPP_CTX);
        webapp.setResourceBase(WEBAPP_DIR);
        server.setHandlers(new Handler[] { webapp });
        server.setConnectors(new Connector[] { connector });
        server.start();
    }
}

When I deploy it in hotdeploy I see the component starting:
2934081 [Timer-2] INFO org.mortbay.log - Started
SocketConnector@0.0.0.0:8080

but I still can't upload blob messages because it complains that the PUT
method is not supported.

So do I need a fully operational web server? 



--
View this message in context: http://activemq.2283324.n4.nabble.com/Using-BlobMessage-with-ActiveMQ-inside-ServiceMix-tp4668354p4668405.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message