Hi, May not answer your question directly, but could you launch the CXF service outside eclipse using maven? My gut feeling is that if you start in eclipse, it's a sub-process of eclipse, so when eclipse is gone, your cxf service is also gone. ------------- Freeman(Yue) Fang
Red Hat, Inc. FuseSource is now part of Red Hat Web: http://fusesource.com | http://www.redhat.com/ Twitter: freemanfang Blog: http://freemanfang.blogspot.com http://blog.sina.com.cn/u/1473905042 weibo: @Freeman小屋 On 2013-4-10, at 下午5:33, Florin Pop wrote: > Hello everybody! > > *I would like to publish a cxf endpoint which is configurend in spring. * > > <jaxws:endpoint > id="serveru" > implementor="com.pachet.nou.HelloWorldImpl" > address="http://localhost:9003/ws/serviciu" > publishedEndpointUrl="http://localhost:9004/ws/serviciuok"> > > *I could use the structure below in order to instantiate the bean.* > > ApplicationContext context = new ClassPathXmlApplicationContext( > "/com/pachet/nou/server.xml"); > EndpointImpl publishedService = (EndpointImpl) context.getBean("serveru"); > > *and then* > > publishedService.publish(); > > *This starts jetty behind (i think) and i am able to see the wsdl in > browser. The problem is that when i close eclipse, the server is destroyed. > I would like to make it work all the time regardless of what application is > started or closed. * > > *I also tried the code below.* > > HelloWorldImpl implementor = new HelloWorldImpl(); > JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); > svrFactory.setServiceClass(HelloWorld.class); > svrFactory.setAddress("http://localhost:9005/helloWorld"); > svrFactory.setServiceBean(implementor); > svrFactory.create(); > > *How can i manage this situation? If i use this* > > javax.xml.ws.Endpoint jaxwsEndpoint *to make an endpoint public, it works > all the time until i call jaxwsEndpoint.unpublish(), even if i close > eclipse.* > > Can i use the same behaviour with cxf?
