Details
-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.2.2.GA, JBossAS-5.0.0.Beta4
-
None
Description
The container artifacts i.e. [Session|Entity|MessageDriven]Container, interceptors, cache, pool, ProxyBindings
should have symmetric create/start/stop/destroy methods.
e.g. The MessageDrivenContainer does this in destroy
// Destroy container invoker
for (Iterator it = proxyFactories.keySet().iterator(); it.hasNext()
{
String invokerBinding = (String) it.next();
EJBProxyFactory ci = (EJBProxyFactory) proxyFactories.get(invokerBinding);
ci.destroy();
ci.setContainer(null);
try
catch(Throwable ignore)
{
}
}
The setContainer(null) is wrong since it isn't the one that sets the container in create()
that is done by EjbModule in its createService() method
In this case, the fix is to either move the setting of container to MessageDrivenContainer::createService()
or move the nulling of the container to EjbModule::destroyService()
Other artifacts also need checking and fixing with tests writing to validate that each container can
go through a stop/destroy/create/start lifecycle and still function correctly.
Attachments
Issue Links
- blocks
-
JBPAPP-707 Use of <depends> on 2.1 MDB to control enabling/disabling consumption leads to NPE
- Resolved