All you should have to do is instaniate an EOEditingContext.  It should
automatically find the database coordinator and share the connection (or
create it if it is the first)

Some things to know though,
1) You better lock/unlock the editing context yourself since this is not the
defaultEditingContext of a session that is automatically locked for you
before each request is serviced.
2) You cannot use EOs across editing contexts.  You need to fault them into
your other context using EOUtilities (category on EditingContext in ObjC, and
a helper class in Java) localInstanceOfObject method.

-dave


Fredrik Pahlm wrote:

> Hi!
> I am creating an application where I want the application object to be
> able to access the database. I have tried to do this in a number of ways,
> none of which seem to work. The methods I have tried are mostly based on
> WODisplayGroups, but I think that this is the wrong approach. What I
> suspect I should do is to create an EOEditingContext instance, but how do
> I tie this to my database?
>
> Do any of you have any tips?
>
> Thanks!
>
> /Fredrik

Reply via email to