users@glassfish.java.net

Singleton @PreDestroy application state?

From: <forums_at_java.net>
Date: Sat, 17 Sep 2011 18:55:54 -0500 (CDT)

I'm trying to figure out in what state is the app server when it's
pre-destroying singleton beans. I was hoping that during the @PreDestroy
phase in the bean lifecycle the EJB and its dependencies are still fully
functional, however when I attempt to call a remote bean in pre-destroy stage
I get NullPointerException (this call works fine in @PostConstruct).

Both Glassfish instances (the caller and the remote appliction) are running @
rev. 3.1.

SEVERE: java.lang.NullPointerException at
com.sun.corba.ee.impl.orb.ORBImpl.getInvocationInfo(ORBImpl.java:1911) at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.getClientRequestDispatcher(CorbaClientDelegateImpl.java:308)
at
com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.releaseReply(CorbaClientDelegateImpl.java:290)
at
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:210)
at
com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at
com.sun.corba.ee.impl.presentation.rmi.codegen.CodegenStubBase.invoke(CodegenStubBase.java:227)
at
dataserver.satellite.__SatelliteManager_Remote_DynamicStub.unregister(dataserver/satellite/__SatelliteManager_Remote_DynamicStub.java)
at
dataserver.satellite._SatelliteManager_Wrapper.unregister(dataserver/satellite/_SatelliteManager_Wrapper.java)
at dataserver.master.LifecycleMananger.shutdown(LifecycleMananger.java:41) 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:597) at
com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1009)
at
com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:65)
at
com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:113)
at
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:138)
at
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.destroy(SystemInterceptorProxy.java:125)
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:597) at
com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:964)
at
com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:65)
at
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:393)
at
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:376)
at
com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.destroy(AbstractSingletonContainer.java:753)
at
com.sun.ejb.containers.AbstractSingletonContainer.doConcreteContainerShutdown(AbstractSingletonContainer.java:664)
at com.sun.ejb.containers.BaseContainer.onShutdown(BaseContainer.java:4234)
at
org.glassfish.ejb.startup.SingletonLifeCycleManager.doShutdown(SingletonLifeCycleManager.java:169)
at org.glassfish.ejb.startup.EjbApplication.stop(EjbApplication.java:301) at
org.glassfish.internal.data.EngineRef.stop(EngineRef.java:169) at
org.glassfish.internal.data.ModuleInfo.stop(ModuleInfo.java:302) at
org.glassfish.internal.data.ApplicationInfo.stop(ApplicationInfo.java:322) at
com.sun.enterprise.v3.server.ApplicationLifecycle.unload(ApplicationLifecycle.java:999)
at
com.sun.enterprise.v3.server.ApplicationLifecycle.disable(ApplicationLifecycle.java:1971)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.stopApplication(ApplicationLoaderService.java:454)
at
com.sun.enterprise.v3.server.ApplicationLoaderService.preDestroy(ApplicationLoaderService.java:422)
at
com.sun.hk2.component.AbstractCreatorInhabitantImpl.dispose(AbstractCreatorInhabitantImpl.java:83)
at
com.sun.hk2.component.SingletonInhabitant.release(SingletonInhabitant.java:81)
at
com.sun.hk2.component.EventPublishingInhabitant.release(EventPublishingInhabitant.java:108)
at com.sun.hk2.component.LazyInhabitant.release(LazyInhabitant.java:133) at
com.sun.enterprise.v3.server.AppServerStartup.stop(AppServerStartup.java:425)
at
com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.stop(GlassFishImpl.java:88)
at
com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.stop(GlassFishDecorator.java:68)
at com.sun.enterprise.v3.admin.StopServer.doExecute(StopServer.java:70) at
com.sun.enterprise.v3.admin.StopDomainCommand.execute(StopDomainCommand.java:95)
at
com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:355)

 


--
[Message sent by forum member 'karl.vizmatik']
View Post: http://forums.java.net/node/844344