[WORKED AROUND] Re: Bug in client side EOF locking?
[WORKED AROUND] Re: Bug in client side EOF locking?
- Subject: [WORKED AROUND] Re: Bug in client side EOF locking?
- From: Stamenkovic Florijan <email@hidden>
- Date: Wed, 28 Jan 2009 15:17:02 -0400
As you suggested, adding this to my EO superclass seems to do it:
private static final Integer monitor = new Integer(345345);
public void willRead(){
synchronized(monitor){
super.willRead();
}
}
public Object willReadRelationship(Object object){
synchronized(monitor){
return super.willReadRelationship(object);
}
}
Just hope it does not introduce deadlocks in the future... Adding
arbitrary synchronization is dangerous business...
Still, I'll report this. I don't believe that exception should be
happening, even with the stuff I am doing...
Thanks,
F
On Jan 28, 2009, at 14:49, Stamenkovic Florijan wrote:
Accessing any EO can trigger EOF access and if you are locking
around EC methods, it won't be locked at that time. You would at
least need to synchronize around willRead() and
willReadRelationship(). Note that willReadRelationship() locks the
object store, not the EC.
Yep, noticed that. Considered making a completely synchronized EO
superclass, but that seems a bit excessive; would probably wreck
performance. However, synchronizing those two methods might be the
way to go....
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden