Hi,

I'm using JBoss 3.2.1 with Hibernate 2.1 and a DB2 local-tx-datasource (driver file: 
db2jcc.jar). There is one methodA with transaction attribute "Required" calling 
another methodB with attribute "RequiresNew". Normally I would assume when methodA is 
rolled back, changes made in methodB are not affected. But this is not the case. All 
changes made in methodA and methodB get rolled back.

Why does this happen? Does anybody know about this issue?

best regards


To illustrate things, a method call hierarchy in pseudo code:
[Required]
  | methodA() {
  | 
  |     // Read/write business data.
  | 
  |     [RequiresNew]
  |     methodB() {
  |         // Write log messages.
  |         // Should not be affected by a rollback in methodA.
  |         // But it is.
  |     }
  | 
  |     // Rollback methodA.
  |     getSessionContext().setRollbackOnly();
  | }


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3844549#3844549

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3844549


-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to