Re: WOLongResponse and EO processing
Re: WOLongResponse and EO processing
- Subject: Re: WOLongResponse and EO processing
- From: Sam Barnum <email@hidden>
- Date: Wed, 26 May 2004 14:08:05 -0700
You shouldn't need to create a new EOObjectStoreCoordinator ( I think)
, simply creating a new EOEditingContext should suffice. In the long
response component method which accepts the qualifier or array of
records to display I'd put something like this:
EOEditingContext ec = new EOEditingContext();
EODatabaseDataSource ds = new EODatabaseDataSource(ec, "MyEntityName");
displayGroup.setDataSource(ds);
On May 26, 2004, at 9:48 AM, rbr wrote:
> Hi Orlando,
>
> as Sam said below, even a WODisplayGroup can get its own
> EOEditingContext
>
> This means that to use WOLongResponsePage with a WODisplayGroup one
> should
>
> 1) configure it not to fetch on load
>
> 2) provide for an EOObjectStoreCoordinator which establishes a
> separate object store stack including a database connection separate
> from that used by the session. Since it is too expensive to create one
> for every such component, i think one should maintain an
> application-wide list of explicitly created free coordinators and use
> them as necessary
>
> 3) create an EOEditingContext by passing such an
> EOObjectStoreCoordinator into its constructor and pass it to the
> WODisplayGroup in the component's constructor before the first fetch
> takes place.
>
> now it should be possible to use an EOEditingContext and a
> WODisplayGroup in the long response thread without collisions and
> deadlocks with the session.
>
> At least, it seems to be so
>
> Richard
>
>
>
>
>
>
>
> Subject:Re: WOLongResponse and EO processing
> To:WOdev List List <email@hidden>
> From:Sam Barnum <email@hidden>
> Date:Wed, 26 May 2004 08:25:58 -0700
>
>
>
> You can create your own EODatabaseDataSource and pass that to the
> WODisplayGroup. Just don't tell the WODisplayGroup to fetch on load,
> or you'll end up doing 2 fetches.
> Alternately, I think you could manually edit the .woo file containing
> the display group. There's a field in there which looks like it sets
> the editing context. Haven't tested this method, though.
> If you're using D2W on the other hand, it's still going to use
> session.defaultEditingContext
_______________________________________________
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.