MultiECLockManager
MultiECLockManager
- Subject: MultiECLockManager
- From: Kent Harris <email@hidden>
- Date: Tue, 4 May 2004 19:26:43 -0700
After reading the EC lock discussion I'm confused (again.)
I'd like to incorporate Jonathan Rochkind's MultiECLockManager. As I
understand it, it is tied to the session object. However, there is no
convenient way to get to the session (a WO object) from an enterprise
object. I have read Appendix A in the "Enterprise Objects" document
wherein they sneak the session into the editing context's delegate but
I have a more difficult problem. I'm using a modified JCAuthentication
framework to provide login for java-client sessions and I use a lot of
peer editing contexts for various actions that I currently invoke from
the java client (prototype debugging via a button click right now but I
will probably break them out into separate applications eventually
that run from a CRON script. They are nightly transaction processing,
etc.)
Here is what's bugging me. An editing context is part of a session.
Many of Apple's diagrams indicate so clearly. I'm aware of the
model/view/controller paradigm but I don't see any intrinsic reason the
editing context shouldn't have a method to return the session object.
What the heck am I missing?
I can certainly just do lock/unlock calls when I create the short-lived
ECs and blow-off the MultiECLockManager but it seems like a neat
approach would be to have MyEditingContext extend EOEditingContext such
that when you create a new MyEditingContext it automatically registers
itself with MultiECLockManager. Then have MyEditingContext.dispose()
simply call the lock manager's unregister method. This would all be
simple but I can't figure out how to get the session given only an EC.
- Kent
_______________________________________________
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.