Race conditions refer to multithreaded environments where two threads try to
access the same data at the same time, therefore it only applies to
persistantly scoped data. I would not be able to tell if this relates to
your problem without analyzing the code.

What kind of database interaction is involved? Since database data is
persistant by nature, there is a potential for race conditions there. In
that case you would want to lock the database calls with native database
lock operators, not with cflock.



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Sravan kumar
Sent: Friday, July 08, 2005 8:03 AM
To: [email protected]
Subject: RE: CFOBJECT and CFLOCk


Thanks Daniel for reply.

You are right, the data is not in persistent scope but still would like to
use it for racial conditions.

Little background on it... We do single sign-on process between our site and
client site.
Java method in question verify the authenticity of the user and then pass
some info from client site to our site. For some reason in particular
occassion we got users swapped. And we are suspecting it due to
threading/racial condition issue. We had a thought of modifying core java
classes to make them synchronized. But thought the quick solution could be
allow one user at a time from coldfusion by using CFLOCK. In the long term,
we will work on modifying java classes to make it thread safe.

Is that makes sense? Do you think my idea will work for the time being?

thanks
Sravan


>From: "Daniel Elmore" <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: <[email protected]>
>Subject: RE: CFOBJECT and CFLOCk
>Date: Thu, 7 Jul 2005 11:39:06 -0500
>
>Hi Sravan, why do you need to lock that method call? The object is not in a
>persistant scope. Is that getter accessing data in such a scope (i hope
>not).
>
>Either way you want something more like:
><cflock timeout="10" throwontimeout="Yes" type="READONLY" name="nw_call">
>
>
>
>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Behalf Of Sravan kumar
>Sent: Wednesday, July 06, 2005 1:51 PM
>To: [email protected]
>Subject: CFOBJECT and CFLOCk
>Importance: High
>
>
>Hi all,
>
>I need a little help with a java class.
>
>can i use CFLOCK like this for a method of a java class?
>
><cfobject action="create" type="java" class="testtttr" name="CTTest1">
><cfset adapter1 = CTTest1.getInstance()>
>        <cflock timeout="120" throwontimeout="Yes" type="EXCLUSIVE"
>name="nw_call">
>                <cfset uid1 = adapter1.getAllAttributes("#cookie.hynoe#")>
>        </cflock>
>
>Thanks
>Sravan
>
>
>----------------------------------------------------------
>To post, send email to [email protected]
>To unsubscribe:
>    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>To subscribe:
>    http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>
>
>
>
>----------------------------------------------------------
>To post, send email to [email protected]
>To unsubscribe:
>    http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
>To subscribe:
>    http://www.dfwcfug.org/form_MemberRegistration.cfm
>
>


----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe:
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe:
   http://www.dfwcfug.org/form_MemberRegistration.cfm





----------------------------------------------------------
To post, send email to [email protected]
To unsubscribe: 
   http://www.dfwcfug.org/form_MemberUnsubscribe.cfm
To subscribe: 
   http://www.dfwcfug.org/form_MemberRegistration.cfm


Reply via email to