Description
In the karaf-rest-example-scr, we should add @Deactivate method to destroy the CXF RS server.
It should look like:
@Component public class RestServiceBootstrap { private MyInjectedService injectedService; private Server server; @Activate public void activate() throws Exception { System.out.println("Activate the MemberServiceImpl"); JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean(); bean.setAddress("/foo"); bean.setBus(BusFactory.getDefaultBus()); bean.setServiceBean(new RestServiceImpl(injectService)); server = bean.create(); } @Deactivate public void deactivate() { System.out.println("Deactivating server: " + server); server.destroy(); } }
Attachments
Issue Links
- links to