users@glassfish.java.net

Re: Statefull ejb problem when peristence exception are report to client

From: <glassfish_at_javadesktop.org>
Date: Tue, 29 Jan 2008 10:07:08 PST

When you first press generate service error button, the runtime exception thrown due to duplicate key is probably not caught by your session bean. This causes the container to destroy the bean (as required by the spec). Hence your next request fails as the container cannot find the instance (neither from cache nor from a backup store where passivated beans are stored).

Your should put a try {} catch around your generateAnError() method.
[Message sent by forum member 'mk111283' (mk111283)]

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