• 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: recovering from a validation exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recovering from a validation exception


  • Subject: Re: recovering from a validation exception
  • From: Philippe Rabier <email@hidden>
  • Date: Mon, 2 May 2005 17:34:56 +0200

>The app already handles valid optimistic locking exceptions gracefully by warning the user and refaulting.
>Here is the exception I get:
>java.lang.IllegalStateException: Server exception: Optimistic locking failure: The object with global ID _EOIntegralKeyGlobalID[Test (java.lang.Integer)1] >has been changed by another client

We had this kind of exception in the past and we have resolved it.

We set the controller of our main window as the delegate of the eoDistributedObjectStore like this :

public void connectionWasEstablished() {
...
EODistributedObjectStore lc_store = (EODistributedObjectStore) editingContext().parentObjectStore();

lc_store.distributionChannel().setDelegate(this);
}

and we have implemented the method distributionChannelShouldThrowServerException like this :

public Throwable distributionChannelShouldThrowServerException(EODistributionChannel channel,
Throwable clientExceptionForServerException,
String originalServerExceptionClassName, String originalServerExceptionMessage) {

System.out.println("originalServerExceptionClassName " + originalServerExceptionClassName);

System.out.println("originalServerExceptionMessage " + originalServerExceptionMessage);
EOApplication.sharedApplication().refreshData();
return clientExceptionForServerException;
}

I thought that the msg "the object with global ID ... has been changed by another client" is a bug, or it's the wrong msg. The code example is a tunraround.

PR
 _______________________________________________
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

  • Prev by Date: Re: WebObjects 5.2.4
  • Next by Date: Re: WebObjects 5.2.4
  • Previous by thread: Re: WebObjects 5.2.4
  • Next by thread: Tiger Server Problems
  • Index(es):
    • Date
    • Thread