Re: Unable to release locks held by deallocated EOEditingContext
Re: Unable to release locks held by deallocated EOEditingContext
- Subject: Re: Unable to release locks held by deallocated EOEditingContext
- From: Joe Moreno <email@hidden>
- Date: Sat, 26 Jul 2008 10:50:50 -0400
Art,
Thanks for pointing me toward MultiECLockManager. I will take a look
at that.
I used the LockErrorScreamerEditingContext found here:
http://en.wikibooks.org/wiki/Programming:WebObjects/EOF/Using_EOF/Context_and_Database_Locking
That was a big help and I was able to correct most of the lock/unlock
EC issues except in a couple places where I still get the following
exception. These exceptions are reproducible, but I haven't been able
to pinpoint the problem.
[2008-07-25 23:54:21 PDT] <WorkerThread13> 1 row(s) processed
[2008-07-25 23:54:21 PDT] <WorkerThread13> === Commit Internal
Transaction
[2008-07-25 23:54:21 PDT] <WorkerThread13> --- Unlocked in
WorkerThread13 (1 remaining)
[2008-07-25 23:54:21 PDT] <WorkerThread13> --- Unlocked in
WorkerThread13 (0 remaining)
[2008-07-25 23:54:21 PDT] <Finalizer> Unable to release locks held by
a deallocated EOEditingContext.
[2008-07-25 23:54:21 PDT] <Finalizer> java.lang.IllegalStateException:
Illegal Lock usage: unlocking thread not owner.
at
com.webobjects.foundation.NSRecursiveLock.unlock(NSRecursiveLock.java:
207)
at
com.webobjects.eocontrol.EOEditingContext.unlock(EOEditingContext.java:
4720)
at
com
.webobjects.eocontrol.EOEditingContext._dispose(EOEditingContext.java:
1158)
at
com
.webobjects.eocontrol.EOEditingContext.finalize(EOEditingContext.java:
1178)
at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
[2008-07-25 23:54:21 PDT] <WorkerThread13> --- Unlocked in
WorkerThread13 (0 remaining)
[2008-07-25 23:54:33 PDT] <WorkerThread14> +++ Lock number (1) in
WorkerThread14
[2008-07-25 23:54:33 PDT] <WorkerThread14> === Begin Internal
Transaction
Thanks,
Joe
On Jul 25, 2008, at 22:59:22, Art Isbell wrote:
On Jul 25, 2008, at 4:41 PM, Joe Moreno wrote:
I'm not quite sure what is causing these exceptions which I cannot
consistently reproduce.
[2008-07-22 14:47:10 PDT] <Finalizer> Unable to release locks held
by a deallocated EOEditingContext.
[2008-07-22 14:47:10 PDT] <Finalizer>
java.lang.IllegalStateException: Illegal Lock usage: unlocking
thread not owner.
The Finalizer thread is trying to unlock an EOEditingContext that a
different thread locked which is not allowed. So your code is not
unlocking an EOEditingContext that it locked. Look for unbalanced
lock()/unlock() pairs.
If you're attempting to manage EOEditingContext locking manually,
you might want to consider using MultiECLockManager (source
available by searching Google) to manage EOEditingContext locking
for you automatically and flawlessly.
Aloha,
Art
_______________________________________________
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
_______________________________________________
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