Re: default editing context locking in directaction
Re: default editing context locking in directaction
- Subject: Re: default editing context locking in directaction
- From: Anjo Krank <email@hidden>
- Date: Wed, 20 Jul 2005 09:28:59 +0200
Am 20.07.2005 um 08:50 schrieb Mike Schrag:
If i call session().defaultEditingContext() from within a
DirectAction, I'm currently defensively locking it. Do I need to,
or does it follow the same (automatic) locking rules as in a normal
WOComponent?
You don't need to lock it.
But anyway, doing sth like:
public WOActionResults someAction() {
WOActionResults page = pageWithName("Foo");
session().defaultEditingContext().lock;
try {
...
} finally {
session().defaultEditingContext().unlock;
}
return page;
}
isn't sufficient, as the appendToResponse phase only occurs *after*
the page is returned and faults could still get fired there... so
when you create an EC there instead of using the session EC, you
still have to lock it in the component.
Cheers, Anjo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden