On Apr 8, 2009, at 10:44 PM, Dies Koper wrote:
> Hi Mitesh,
>
> I have a question about the instance pool for Stateless and Entity
> beans.
>
> When stopping the server, instances in the pool are not cleaned up,
> ejbRemove, unsetEntityContext callback methods are not called and
> PreDestroy intercepter methods are not called. They are when
> undeploying
> an application.
> Why are these callback methods not called when a server is stopped?
>
> In the source:
> com/sun/ejb/containers/EntityContainer.java
> com/sun/ejb/containers/StatelessSessionContainer.java
>
> onShutdown() and onTermination() methods are not implemented, while
> they
> are for MDBs and SFSBs.
>
> The EJB spec seems to indicate these methods should be called to bring
> back the instances to their "does not exist" status, but is it because
> we are stopping the VM anyway?
Hi Dies,
This was a longstanding bug in V2 and earlier. In V3 the bean instances
for each container type are explicitly removed during both server
shutdown
and undeploy.
--ken
>
> Thanks,
> Dies
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>