Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes EJB and other Java EE Technologies and the fly likes Transaction management Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Transaction management" Watch "Transaction management" New topic

Transaction management

Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
Hi All,
I have a very complex problem with transaction management. there is a session bean running on one weblogic server that makes a call to another session bean on another weblogic server running on second machine. the calling method has tx attribute as RequiresNew. The called method has tx attribute as NotSupported. I What happens is like this:
1. Calling method f1() makes some local database updates
2. then f1 calls f2 on remote weblogic servers.
3.Method f1 finishes and changes in database are committed. However, the control does not come back to calling application.
4.then i see timeoutexception on my server's console as the it waits for the remote weblogic server to complete.
the error message is as follows :
javax.transaction.SystemException: Timeout during commit processing

5. This exception is thrown back to calling client. However, the local database update is not rolled back.
Can anybody explain me what is happening wrong in this scenario.
I am using non-XA driver.
Any help would be greatly appreciated.
Rashmi Tambe
amit mawkin
Ranch Hand

Joined: Oct 31, 2001
Posts: 73
ideally it should have happened that
when f1 calls f2 , f1 should be suspended and f2 should do its work
, and when f2 has finished his work f1 should resume and finish all the pending tasks.
Further I recommend using XA driver if its possible.
In no case F1 should finish before F2.

regards, Amit
coffee drinker and Sun Certified Programmer for Java 2 Platform
I agree. Here's the link:
subject: Transaction management
jQuery in Action, 3rd edition