Re: Dynamically altering external names for Entities (solution)
Chuck Hill <[email protected]> Wed, 14 May 2003 09:15:08 -0700
| Newsgroups | gmane.comp.web.webobjects.eof |
|---|---|
| Message-ID | <[email protected]> |
At 08:56 AM 14/05/2003 -0500, Mark Morris wrote: >To continue the thought, I could create a new EOObjectStoreCoordinator in the Session constructor: > > EOObjectStoreCoordinator osc = new EOObjectStoreCoordinator(); > setDefaultEditingContext(new EOEditingContext(osc)); > If you do this, be sure that you don't have EOEditingContext = new EOEditingContext() anywhere in your code. >Then I could register a Session method for a channelNeeded notification from only that EOObjectStoreCoordinator's EOCooperatingObjectStores. (Will one exist yet? Could more be created?) > One will probably exist. More can be created. Catching that notification should be sufficient. It is not clear to me if this code will result in each OSC having its own DB connection or not. I'm still working on my morning coffee. :-) The EOF docs for 5.2 include examples of how to do this. >In that Session method, of course, is where I'd set my delegate on the channel, so theoretically I would know that these channels are only for a particular Session, and can have session-specific info in the delegate. > >Does this make sense? Thanks again! > Yes, this makes sense given my previous caveats. Personally, I'd work really hard to avoid going this route, but if you must this does seem the way. Chuck >-- Mark > > >On Wednesday, May 14, 2003, at 08:32AM, Mark Morris <[email protected]> wrote: > >>Okay, working along those lines, can't I set up a connection per Session? Something along the same lines as when you want to use the actual user's database login and password for the connection dictionary? >> >>Thanks again for all the assistance! :-) >> >>-- Mark >> > -- Chuck Hill [email protected] Global Village Consulting Inc. http://www.global-village.net