3 Replies Latest reply on Aug 10, 2007 2:54 PM by Mike Nardone

    Interrupting a stateful session bean in use

    Mike Nardone Newbie

      In the project I am working on, there is a method call which takes in several parameters and then calls a stateful session bean to perform some heavy-duty processing on the server-side. This processing consumes a (very) non-trivial amount of memory. Our client software allows the user to cancel this process, but the cancellation is currently implemented by simply dropping the client's reference to the SFSB and getting a handle to a new bean. The old SFSB continues its processing until it finishes, which consumes an awful lot of memory I would like to reclaim. I can't directly destroy the bean while it's processing because I get a ConcurrentAccessException. Is there a way to interrupt the method this SFSB while running without hitting the concurrent access issue?

      -Mike