When I create a JAX-RS server and run it in process with the following code:

        JAXRSServerFactoryBean sf = new JAXRSServerFactoryBean();
        sf.setServiceClass(LibraryRestImpl.class);
        sf.setBindingId(JAXRSBindingFactory.JAXRS_BINDING_ID);
        sf.setAddress("http://localhost:8081/cxf-library-rest";);
        Server server = sf.create();
        synchronized (LibraryRestImpl.class) {
            try {
                LibraryRestImpl.class.wait(60000);
            } catch (InterruptedException e) {
                // ignore
            }
        }
        server.stop();
        server.destroy();

the Jetty threads keep running even after the service has been shutdown.
How can I terminate the Jetty server?

Thanks,

  - Dennis

-- 

Dennis M. Sosnoski
Java SOA and Web Services Consulting <http://www.sosnoski.com/consult.html>
Axis2/CXF/Metro SOA and Web Services Training
<http://www.sosnoski.com/training.html>
Web Services Jump-Start <http://www.sosnoski.com/jumpstart.html>

Reply via email to