users@glassfish.java.net

Re: Removing stateful EJB and transactions

From: <glassfish_at_javadesktop.org>
Date: Tue, 30 Oct 2007 07:01:26 PST

I found a work around.

A possible solution is to collect all called Stateful Session Beans in a list. Then, make sure the remove method is annotated with @Remove() and @TransactionAttribute(TransactionAttributeType.NEVER). When the latter is omitted, you get another Transaction exception. When all remove-methods are marked like this, then there is no problem.

However, the only thing which still bothers me, is that I cannot remove the EJB called by the method through a Lookup directly. I have to wait until I clean up the complete bean. Any suggestions?

Greetings
Jan De Cooman
[Message sent by forum member 'ossaert' (ossaert)]

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