• 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: IllegalStateException: There is no database snapshot available...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IllegalStateException: There is no database snapshot available...


  • Subject: Re: IllegalStateException: There is no database snapshot available...
  • From: Michael Schmiedgen <email@hidden>
  • Date: Thu, 02 Apr 2009 13:19:10 +0200

Please keep messages on the list.

arghhh... pressed the wrong button.

Yes, thats what I mean. For every page that does data manipulation I
use a child editing context.

Why a child instead of a peer? To me, using a child seems to be the wrong thing to do. That may well be causing this problem if the user back tracks or a validation exception is thrown.

Ok.

Are you creating your own editing contexts? If so, how are you locking and unlocking them? Are you calling undo() or revert() on the editing context? Is your application running out of memory?

I use ERXEC, so I dont have to care about locking, or should I?

No, not if your properties are set correctly. But you did not say so I had to ask. :-)

er.extensions.ERXEC.safeLocking=true

If I do data manipulation / saveChanges, I only do it this way:

In constructor:
ecSession = (ERXEC) session().defaultEditingContext();
ecDetail = (ERXEC) ERXEC.newEditingContext(ecSession);

I'd just make that

ecDetail = (ERXEC) ERXEC.newEditingContext();

I tried that and it seems to work.

On save:
synchronized (LOCK) {
    ecDetail.saveChanges();
    ecSession.saveChanges();
}

No catch for save failures?

Yes, there is some try/catch around this.

So many thanks, this editing context thing really seems to work. :)

Cheers
  Michael

--
 Michael Schmiedgen, BSc

 Takwa GmbH
 Bodelschwinghstr. 25
 99096 Erfurt GERMANY

 Tel  +49 361 6534096
 Fax  +49 361 6534097
 Mail email@hidden
 Web  http://www.takwa.de/

 Geschaeftsfuehrung: Ingo Buchholz
 HRB 12964, Amtsgericht Erfurt
_______________________________________________
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


References: 
 >Re: IllegalStateException: There is no database snapshot available... (From: Chuck Hill <email@hidden>)

  • Prev by Date: AjaxAutoComplete and AjaxObserveField
  • Next by Date: maven.
  • Previous by thread: Re: IllegalStateException: There is no database snapshot available...
  • Next by thread: Re: [ANN] AjaxDatePicker and AjaxDefaultSubmitButton
  • Index(es):
    • Date
    • Thread