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      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to