users@glassfish.java.net

Re: Trouble calling a _at_Remove method of a stateful bean during a CMT

From: <glassfish_at_javadesktop.org>
Date: Tue, 01 Sep 2009 14:39:19 PDT

Thanks.

Yes, somehow I hoped that the session could be closed, an the object removed, at the end of the current transaction.

Let's imagine this scenario then: what if I call an interface method of a stateless bean which, in turn, calls another stateful bean (I know nothing about its implementation, of course) and @Remove-it. I haven't got any control over EJBs I call, I assume I just know their business interface. Now, if and only if it's only my business method that instantiates and calls stateful beans I have a mean to arrange @Remove calls just at the end of my business method but as far as I depend on some other bean, I cannot be sure. That's happening to me in another scenario, indeed.
[Message sent by forum member 'emcrisostomo' (enrico.m.crisostomo_at_gmail.com)]

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