Re: warnings for EC without lock?
Re: warnings for EC without lock?
- Subject: Re: warnings for EC without lock?
- From: email@hidden
- Date: Thu, 23 Oct 2003 13:06:10 CDT
- Priority: 3 (Normal)
[demime could not interpret encoding binary - treating as plain text]
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.
_______________________________________________
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.