users@glassfish.java.net

_at_ApplicationException-Annotation not found by container

From: <glassfish_at_javadesktop.org>
Date: Thu, 14 Oct 2010 08:26:01 PDT

Hi,

I recently faced the problem, that a UserException annotated with ApplicationException and rollback=true did not cause a rollback in case it is thrown. After some research I found this issue https://glassfish.dev.java.net/issues/show_bug.cgi?id=5183 the described situation resembles mine.

We have the following structure. There are two ejb-jars. The first one contains the UserException, the second one has a session bean modifies and entity and throws the exception. If tested by calling the session bean from a jsp in a war file, the exception does not cause the transaction to rollback.

By now I have figured out that adding a using a ejb-jar.xml in the second ejb-jar that contains the UserException in its assembly-constructor solves the problem, but still I am wondering if it is intended behaviour that the UserException is not regarded as ApplicationException with rollback true if this .xml-File is absent.

I'm currently working with Glassfish v3.

Thanks for your help.
[Message sent by forum member 'shine4u']

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