• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Optimistic Locking on Client
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Optimistic Locking on Client
      • From: Praveen Boppana <email@hidden>
    • Re: Optimistic Locking on Client
      • From: Praveen Boppana <email@hidden>
References: 
 >Optimistic Locking on Client (From: Praveen Boppana <email@hidden>)

  • Prev by Date: WO 5.2.3 in Tomcat 4.1.31 not reading Properties file
  • Next by Date: Walking an Object's Relationships
  • Previous by thread: Optimistic Locking on Client
  • Next by thread: Re: Optimistic Locking on Client
  • Index(es):
    • Date
    • Thread