FAQ
I'm pretty sure this fixed the issue I was talking about on the user list.
Before I go ahead and backport it to the other branches, could someone more
familiar with the code take a quick look at the change?

I'm a little skeptical because this strikes me as something one of the other
ROP users would have run into at some point.

Thanks,
Kevin

On 12/14/07 11:27 AM, "kmenard@apache.org" wrote:

Author: kmenard
Date: Fri Dec 14 08:27:43 2007
New Revision: 604216

URL: http://svn.apache.org/viewvc?rev=604216&view=rev
Log:
Fixed an issue with the ThreadLocal not being initialized for all threads.

Modified:

cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apac
he/cayenne/CayenneContextGraphAction.java

Modified:
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apac
he/cayenne/CayenneContextGraphAction.java
URL:
http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpub
lished/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java?rev=604
216&r1=604215&r2=604216&view=diff
==============================================================================
---
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apac
he/cayenne/CayenneContextGraphAction.java (original)
+++
cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apac
he/cayenne/CayenneContextGraphAction.java Fri Dec 14 08:27:43 2007
@@ -35,12 +35,14 @@
*/
class CayenneContextGraphAction extends ObjectContextGraphAction {

- ThreadLocal<Boolean> arcChangeInProcess;
+ static final ThreadLocal<Boolean> arcChangeInProcess = new
ThreadLocal<Boolean>() {
+ protected synchronized Boolean initialValue() {
+ return Boolean.FALSE;
+ }
+ };

CayenneContextGraphAction(ObjectContext context) {
super(context);
- this.arcChangeInProcess = new ThreadLocal<Boolean>();
- this.arcChangeInProcess.set(Boolean.FALSE);
}

protected void handleArcPropertyChange(

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriescayenne
postedDec 14, '07 at 4:30p
activeDec 14, '07 at 4:30p
posts1
users1
websitecayenne.apache.org

1 user in discussion

Kevin Menard: 1 post

People

Translate

site design / logo © 2022 Grokbase