[
https://issues.apache.org/jira/browse/ARIES-1673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet reopened ARIES-1673:
------------------------------------
Can you try removing the method and see if it still behaves correctly ? I'm
travelling all day so I have limited access.
> 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.2.0
> Reporter: Anton Deripaska
> Assignee: Guillaume Nodet
> Priority: Critical
> Fix For: blueprint-spring-0.3.0
>
>
> 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)