users@glassfish.java.net

Re: EJB lifecycle, how to catch EJB unload event

From: <glassfish_at_javadesktop.org>
Date: Tue, 27 Nov 2007 05:36:56 PST

another little test was the following:
in a public methode of the stateful ejb I put an endless loop that prints out some text to systemout. When I undeploy the application from glassfish, the loop is still running.

       do {
            System.out.println("ejb ping");
            try {
                Thread.currentThread().sleep(2000);
            } catch (InterruptedException ex) {
                ex.printStackTrace();
            }
        } while(true);

Can someone please explain in detail what glassfish is doing (or is trying to do) with an stateful session EJB that is part of an app that gets undeployed. Under what circumstances does glassfish clean up that EJB ?
[Message sent by forum member 'swordofdarius' (swordofdarius)]

http://forums.java.net/jive/thread.jspa?messageID=247342