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
[email protected]: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://servicemix.396122.n5.nabble.com/Web-server-in-ServiceMix-tp5717041p5717050.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.