Re: warnings for EC without lock?
Re: warnings for EC without lock?
- Subject: Re: warnings for EC without lock?
- From: Chuck Hill <email@hidden>
- Date: Thu, 23 Oct 2003 16:28:44 -0700
IIRC, these messages were originally output when concurrent request
handling was disabled. That was in WO 5.0, I believe. There was a great
uproar and many "bug" reports were filed about this as many people
contended that it was not really a problem if concurrent request handling
was disabled. Now, we know that is not absolutely true but that's the way
it was.
Apple responded to this great demand. I think if you look in the release
notes from a patch to 5.0 or from 5.1 you will see that this logging
behaviour was changed to what you now see.
I recall there is some interaction between this and the adaptors
dispatching requests concurrently that could be exploited to turn it on for
the purposes of logging while still not actually processing requests
concurrently. But I might just be mis-remembering fighting with WO to get
it to actually start dispatching requests concurrently. Long ago and late
at night...
Chuck
At 01:06 PM 23/10/2003 CDT, email@hidden wrote:
>Okay, I figured out a problem. It seems that EOF won't output 'access
>with no lock' warnings unless you have allowsConcurrentRequestHandling
>set to true. If I have this set to true in my test app, and the
>DebugGroupMultithreading enabled, I get these warnings. If I do not have
>this set to true, I can figure out NO way to turn on these warnings.
>
>This is highly annoying. My production app does not allow concurrent
>request handling. And yet, I still want these warnings. It is still
>dangerous to access an EC without locking it, even if you don't have
>concurrent request handling. (We on the list were confused about this for
>a while; seems like someone at Apple was too). But I can find no way to
>turn on these warnings without allowing concurrent request handling. But
>I need to be sure my app isn't illegally accessing EOF without a lock, to
>rule that out in tracking down some mysterious exceptions.
>
>Argh. If anyone has any ideas of a way to get these warnings enabled, let
>me know. I'll file a bug. I am very frustrated.
>
>--Jonathan
>
>On Thu, 23 Oct 2003 12:53:19 CDT email@hidden wrote:
>
>> I can not seem to manage to get warnings printed out for using an EC
>> without locking it first. There's supposed to be some ways to get this
>> warning, right?
>>
>> I have made a simple test application. In the Application
>> constructor, I set:
>>
>> NSLog.setAllowedDebugLevel( NSLog.DebugLevelDetailed );
>> NSLog.allowDebugLoggingForGroups(NSLog.DebugGroupMultithreading);
>>
>> I believe this is supposed to turn on the warnings I want.
>>
>> In a component action, I do:
>> EOEditingContext ec = new EOEditingContext();
>> System.err.println("Trying access without lock, what happens?");
>> EOFetchSpecification spec = new EOFetchSpecification("Employee",
>> null, null);
>> NSArray objects = ec.objectsWithFetchSpecification(spec);
>> Employee e = new Employee();
>> ec.insertObject(e);
>> e.setName("foo");
>> ec.saveChanges();
>> System.err.println("done");
>>
>>
>> This is accessing an EC, the one I just created, in an illegal way,
>> right? It should print out a warning? It does not. Not on Windows, not
>> on Solaris, I tried both.
>>
>> Huh? I really want to get these warnings, so I can rule out improper EC
>> locking in trying to diagnose this really mean intermittent bug I'm
>> getting. But I can't get it turned on. This is really frustrating.
>> Any ideas?
>>
>> --Jonathan
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
>> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
>>
>
>
>
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.