[OFBiz] Dev - RE: [OFBiz] SVN: r4785 - trunk/framework/jotm/lib

Ryan Warnick warnickr_1 at isp01.net
Fri Apr 8 13:19:53 EDT 2005


I just had a look at the fix in JOTM and it still looks like there is an
issue.  Even though some of the problems were resolved, there is still a
race condition.  Here is my thinking:

The core issue is that there is only ONE Current object and it has only
ONE member variable called transactionTimeout.  Ofbiz uses the begin()
method which sets the transaction timeout value for the new transaction
to the value of transactionTimeout.  So, if one thread calls
setTransactionTimeout and sets the timeout to 60 seconds and before that
same thread can call begin another thread calls setTransactionTimeout
and sets it 30 seconds, then the original thread's transaction timeout
will be 30 seconds.  The transactionTimeout member variable is being
shared by all threads and it seems like only way to prevent the race
condition is to make calls to setTransactionTimeout and begin atomic.
Of course, there are some better ways to address this issue, such as
having a begin() method that accepts the timeout as an input and just
uses it locally for the transaction.

Ryan

-----Original Message-----
From: svn-bounces at lists.ofbiz.org [mailto:svn-bounces at lists.ofbiz.org]
On Behalf Of jaz at svn.ofbiz.org
Sent: Thursday, April 07, 2005 3:07 PM
To: svn at lists.ofbiz.org
Subject: [OFBiz] SVN: r4785 - trunk/framework/jotm/lib


Author: jaz
Date: 2005-04-07 16:06:19 -0500 (Thu, 07 Apr 2005)
New Revision: 4785

Modified:
   trunk/framework/jotm/lib/carol.jar
   trunk/framework/jotm/lib/jotm.jar
   trunk/framework/jotm/lib/jotm_iiop_stubs.jar
   trunk/framework/jotm/lib/jotm_jrmp_stubs.jar
Log:
updated to JOTM 'HEAD' (pre 2.0.9) which fixed setTransactionTimeout()
bug


Modified: trunk/framework/jotm/lib/carol.jar
===================================================================
(Binary files differ)

Modified: trunk/framework/jotm/lib/jotm.jar
===================================================================
(Binary files differ)

Modified: trunk/framework/jotm/lib/jotm_iiop_stubs.jar
===================================================================
(Binary files differ)

Modified: trunk/framework/jotm/lib/jotm_jrmp_stubs.jar
===================================================================
(Binary files differ)

 
_______________________________________________
Svn mailing list
Svn at lists.ofbiz.org
http://lists.ofbiz.org/mailman/listinfo/svn



__________ NOD32 1.1049 (20050406) Information __________

This message was checked by NOD32 antivirus system. http://www.nod32.com




More information about the Dev mailing list