Hi, I am using stateless session bean with container managed trasaction and requiers as an transaction attribute. For testing purpose I am throwing an exception but data is not getting rollback. It seems transaction is not managed properly by container. I am using Jrun 3.1 as app. server. Thanks in advance.
posted 15 years ago
If the exception you throw is an application exception (i.e. not a system exception), the behaviour you describe is normal. The container should not rollback a transaction because of an application exception. If you want to force a rollback in your session, you must mark the transaction for rollback invoking setRollbackOnly on the session context.