You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/01/27 10:05:24 UTC

[jira] [Commented] (ARIES-1673) Spring beans not destroyed

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

ASF subversion and git services commented on ARIES-1673:
--------------------------------------------------------

Commit 1780532 from [~gnt] in branch 'aries/trunk'
[ https://svn.apache.org/r1780532 ]

[ARIES-1673] Spring beans not destroyed

> Spring beans not destroyed
> --------------------------
>
>                 Key: ARIES-1673
>                 URL: https://issues.apache.org/jira/browse/ARIES-1673
>             Project: Aries
>          Issue Type: Bug
>          Components: Blueprint
>    Affects Versions: blueprint-spring-0.3.0
>            Reporter: Anton Deripaska
>            Assignee: Guillaume Nodet
>            Priority: Critical
>
> Hello everyone!
> I have some problem with undeploy bundle using Blueprint Spring. 
> If properly understood it, SpringApplicationContext NOT destroy when bundle uninstall.
> For example, simple bundle with jax-rs:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:context="http://www.springframework.org/schema/context"
>        xmlns:jaxrs="http://cxf.apache.org/jaxrs"
>        xsi:schemaLocation="
>              http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>              http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
>              http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd
> ">
>     <context:annotation-config/>
>     <jaxrs:server id="test" address="/test">
>         <jaxrs:serviceBeans>
>             <ref bean="rs-test"/>
>         </jaxrs:serviceBeans>
>     </jaxrs:server>
>     <bean id="rs-test" class="com.dob.ams.osgi.service.TestRestService"/>
> </beans>
> {code}
> It's worked, server was registered (call JAXRSServerFactoryBean#create).
> Next step: uninstal this bundle. All methods with annotation @PreDestroy called, but not JAXRSServerFactoryBean#destroy (and not call SpringApplicationContext#close).
>  
> When I again deploy this bundle, I get the error:
> {quote}
> Caused by: org.apache.cxf.service.factory.ServiceConstructionException: There is an endpoint already running on /test.
> 	at org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:86)
> 	at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
> 	at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)
> {quote}
> Аny help would be appreciated!
> Regards
> Anton



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)