-
Sub-task
-
Resolution: Done
-
Major
-
AS 5.0.0.Beta4
-
None
One part of the parent issue is the SFSB cache is stopped before other elements of the container. This leads to undeployment problems like the following:
2008-05-15 13:42:35,711 WARN [org.jboss.kernel.plugins.dependency.StartStopLifecycleAction] (RMI TCP Connection(6)-127.0.0.1) Error during stop for jboss.j2ee:ear=clusteredsession-nested.jar,jar=clusteredsession-nested.jar,name=testDeepNestedStateful,service=EJB3
java.lang.RuntimeException: exception thrown while removing SFSB
at org.jboss.ejb3.stateful.StatefulBeanContext.remove(StatefulBeanContext.java:668)
at org.jboss.ejb3.stateful.ProxiedStatefulBeanContext.remove(ProxiedStatefulBeanContext.java:277)
at org.jboss.ejb3.pool.AbstractPool.remove(AbstractPool.java:145)
at org.jboss.ejb3.InfinitePool.destroy(InfinitePool.java:44)
at org.jboss.ejb3.pool.ThreadlocalPool.destroy(ThreadlocalPool.java:71)
at org.jboss.ejb3.EJBContainer.stop(EJBContainer.java:877)
at org.jboss.ejb3.session.SessionContainer.stop(SessionContainer.java:229)
at org.jboss.ejb3.stateful.StatefulContainer.stop(StatefulContainer.java:262)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:240)
at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
at org.jboss.kernel.plugins.dependency.LifecycleAction.uninstallActionInternal(LifecycleAction.java:249)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:157)
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.uninstallAction(InstallsAwareAction.java:42)
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleUninstallAction(SimpleControllerContextAction.java:79)
at org.jboss.dependency.plugins.action.AccessControllerContextAction.uninstall(AccessControllerContextAction.java:131)
at org.jboss.dependency.plugins.AbstractControllerContextActions.uninstall(AbstractControllerContextActions.java:58)
at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1408)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1066)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:988)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:515)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:471)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:99)
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.undeploy(BeanMetaDataDeployer.java:46)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalUndeploy(AbstractSimpleRealDeployer.java:69)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:197)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1189)
at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1182)
at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1144)
at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1408)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1066)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:679)
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:456)
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:510)
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
at org.jboss.deployment.MainDeployer.undeploy(MainDeployer.java:638)
.....
Caused by: java.lang.NullPointerException
at org.jboss.ejb3.cache.tree.StatefulTreeCache.remove(StatefulTreeCache.java:241)
at org.jboss.ejb3.stateful.StatefulBeanContext.removeContains(StatefulBeanContext.java:337)
at org.jboss.ejb3.stateful.StatefulBeanContext.remove(StatefulBeanContext.java:652)
... 96 more
Basically, the cache is stopped so it's nulled out some fields, but the the container stops its pool, which calls remove() on beans, thus invoking on the cache.
Note that fixing this doesn't completely fix the parent issue; still need to prevent shutdown of the container while still handling requests and ensure that requests that come in while shutdown is happening get an exception that triggers failover in a clustered proxy.