You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by "Petr V." <gr...@yahoo.com> on 2008/11/13 02:26:39 UTC
How to Keep Jetty Running for desktop Application
I put following lines in my beans.xml
<jaxws:endpoint id="service1"
implementor="com.vmware.cp.cxftest1.Service1"
address="http://localhost:9000/service1" />
And then I have a test class whose main method has
ClassPathXmlApplicationContext serverContext = new ClassPathXmlApplicationContext(new String[] {"beans.xml"});
The service gets published and I can consume it successfully but I need to put Thread.sleep() in my main method to keep jetty running other wise as soon as main method exits, the jetty dies.
Is there any way, I can configure jetty via config file to keep it running. My application is not web based so I do not have any web.xml.
I found wiki page http://cwiki.apache.org/confluence/display/CXF20DOC/Jetty+Configuration but it is not very useful.
Any help or guidance/direction would be much appreciated.
Thanks,
Petr