[ 
https://issues.apache.org/jira/browse/KARAF-6523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16980696#comment-16980696
 ] 

ASF subversion and git services commented on KARAF-6523:
--------------------------------------------------------

Commit 67769be945f51fd43e6013caed5e96d962dd7635 in karaf's branch 
refs/heads/master from Jean-Baptiste Onofré
[ https://gitbox.apache.org/repos/asf?p=karaf.git;h=67769be ]

Merge pull request #998 from jbonofre/KARAF-6523

[KARAF-6523] Cleanly destroy CXF server in REST/SOAP examples

> Cleanly destroy the CXF server in the REST/SOAP examples
> --------------------------------------------------------
>
>                 Key: KARAF-6523
>                 URL: https://issues.apache.org/jira/browse/KARAF-6523
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>            Reporter: Jean-Baptiste Onofré
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.3.0, 4.2.8
>
>
> In the karaf-rest-example-scr, we should add {{@Deactivate}} method to 
> destroy the CXF RS server.
> It should look like:
> {code:java}
> @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();
>       }
> } {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to