Hi,
I get a BundleException when one of my bundle stops. This bundle contains the following beans definitions :
andCode:<bean id="taskExecutor" class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor"> <property name="corePoolSize" value="5" /> <property name="maxPoolSize" value="10" /> <property name="queueCapacity" value="25" /> </bean> <bean id="EventPublisherServiceBean" class="org.escapek.core.internal.event.EventPublisherService" init-method="init" destroy-method="destroy"> <property name="taskExecutor" ref="taskExecutor"></property> <property name="listeners" ref="EventListeners"></property> </bean> <bean id="EventLoggingListenerBean" class="org.escapek.core.internal.event.EventLoggingListener" />
The EventPublisherServiceBean depends on a service reference lists and registers itself as an exorted service. The definition shows that init-method and destroy-method are called on when the bean is created/destroyed. Inside the method, I create a thread which does some stuffs. Inside the destroy method the thread stops.Code:<list id="EventListeners" cardinality="0..N" interface="org.escapek.core.event.IEventListener"> </list> <service ref="EventPublisherServiceBean" interface="org.escapek.core.event.IEventPublisher" /> <service ref="EventLoggingListenerBean" interface="org.escapek.core.event.IEventListener" />
now it happens that when this bundles is stopped, I get a BundleException. The full stack trace is attached to this post. It shows that the exception is thrown when EventPublicherServiceBean service references list is destroyed.


