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: Mon, 28 Jul 2008 00:16:03 -0700
cug,
Yes, I need to look at that – I've been dragging my feet about
integrating Wonder. Thanks for the nudge.
- Joe
On Jul 27, 2008, at 11:48:36, Guido Neitzer wrote:
Is there no chance of using Wonder and the ERXEC autolocking? It
solves MANY problems and not only problems that are locking related.
cug
On 27.07.2008, at 12:11, Joe Moreno wrote:
Art,
I tracked down my editing context bug using the
LockErrorScreamerEditingContext (LESEC).
Every place I created an EOEdtingContext, in my app and the
supporting frameworks, I changed it to the LESEC which made it easy
to balance out my EC locks and unlocks. It seems to be working well.
Thanks,
Joe
On Jul 26, 2008, at 10:50:50, Joe Moreno wrote:
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
_______________________________________________
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
--
http://www.event-s.net
_______________________________________________
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