users@glassfish.java.net

Re: Unexpected Behavior: NoResultException rolls back transaction

From: <glassfish_at_javadesktop.org>
Date: Sun, 27 Jan 2008 15:16:01 PST

ok, being in a CMT it makes total sense to me that every runtime exception that is not caught by myself would cause the transaction to be rolled back by the container.

BUT then javadoc is very confusing. To NoResultException it says:
"This exception will not cause the current transaction, if one is active, to be marked for roll back."

As far as i know, NoResultException and NonUniqueResultException are the only RuntimeExceptions that have this addition in javadoc.

But, according to your posts, the behavior of the EJBContainer is consistent for ALL RuntimeExceptions: Every time a RuntimeException occurs that is not caught by myself the container will catch it and rollback the transaction.

Javadoc should really do without the addition in NoResultException and NonUniqueResultException mentioned above. The addition causes nothing more than confusion, because these two exceptions are the only two RuntimeExceptions that have this addition, although they ARE treated by the container like every other RuntimeException.
[Message sent by forum member 'zebhed' (zebhed)]

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