PDA

View Full Version : ContextSingletonBeanFactoryLocator & destroy-method issu


AymericAlibert
Dec 1st, 2004, 08:42 AM
I am loading the Spring context from my EJBs using a ContextSingletonBeanFactoryLocator:

public void setSessionContext(SessionContext sessionContext) {
super.setSessionContext(sessionContext);
setBeanFactoryLocator(ContextSingletonBeanFactoryL ocator.getInstance());
setBeanFactoryLocatorKey(EJB_CONTEXT_ID);
}


in the Spring XML file, I have something like that:

<bean id="serviceConfiguration" class="com.blahblah.ServiceConfiguration" init-method="init" destroy-method="destroy" >
<property name="listener">
<ref local="listenerImpl"/>
</property>
</bean>

Everything works fine (the init method is called when the application is loaded), but the destroy method is never called by Spring.
I checked that the onEjbRemove() method is called properly when the application is undeployed, but the framework do not call the destroy method.
I am using Weblogic 8.1.3.

Any idea or workaround?

Thanks,

Aymeric.