Re: Optimistic Locking on Client
Re: Optimistic Locking on Client
- Subject: Re: Optimistic Locking on Client
- From: Nick Pilch <email@hidden>
- Date: Mon, 22 Aug 2005 11:19:23 -0700
Title: Re: Optimistic Locking on
Client
I think the server would be handing back the exception to the
client, so it would likely be wrapped in an NSForwardException and the
string "Server Exception" or "ServerException"
will appear in there somewhere. This information is from my
memory.
At 9:41 AM -0400 8/22/05, Praveen Boppana wrote:
Hi,
Any one has any suggestion about handling
Optimistic Locking Error on Java Client application?.
I know how it can be handled on server
side using following code.
/**
* Determine if the exception
thrown during a save is an optimistic locking
exception.
*/
public boolean
isOptimisticLockingFailure(EOGeneralAdaptorException
exceptionWhileSaving) {
//Get the info dictionary that is created when the exception is
thrown.
NSDictionary
exceptionInfo = exceptionWhileSaving.userInfo();
//Determine the type of the failure.
Object
failureType = (exceptionInfo != null) ?
exceptionInfo.objectForKey(EOAdaptorChannel.AdaptorFailureKey) : null;
//Return depending on the type of failure.
if ((failureType != null) &&
(failureType.equals(EOAdaptorChannel.AdaptorOptimisticLockingFailure))) {
return true;
} else {
return false;
}
}
Since we do not have access to the
com.webobjects.eoaccess from client side. I'm not sure how can handle
this.
Please help.
Thanks
Praveen
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list
(email@hidden)
Help/Unsubscribe/Update your Subscription:
>asy.org
This email sent to
email@hidden
--
Nick Pilch / email@hidden
_______________________________________________
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