• 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: Locking Session.defaultEditingContext() Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locking Session.defaultEditingContext() Question


  • Subject: Re: Locking Session.defaultEditingContext() Question
  • From: "Tonny Staunsbrink" <email@hidden>
  • Date: Tue, 1 Apr 2008 20:13:44 +0200

If I should take a guess, I would say it's a concurrency issue. Are you running a multithreaded app, do you have custom RequestHandler or are you running any background jobs?

/T

On Tue, Apr 1, 2008 at 5:17 PM, Dov Rosenberg <email@hidden> wrote:
I have been tracking down a strange error in our app.

java.lang.IllegalStateException: There is no database snapshot available for the object

In a lot of places we use a new EditingContext instead of the default Editing Context for the session. When we use a new editing context we have been very careful to lock and unlock before and after use. In some places we use the session default EditingContext (we are probably going to stop doing that in the future). A couple of questions come to mind:

  1. I have read that it is not necessary to lock the session default EditingContext because EOF will automanage it. What happens if it does get manually locked? The error above was thrown when trying to do an ec.lock() on a Session.defaultEditingContext().
  2. What physically happens when an EC is locked? It seems it is some sort of reference counter. In an earlier post Chuck mentioned that locking the EODatabaseContext will prevent fetches/saves from occurring, what happens when an EC is locked?
  3. Is there any compelling reason to use the session default editing context? We aren't using Project Wonder (yet)

Thanks in advance for any help

Dov Rosenberg

 _______________________________________________
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

 _______________________________________________
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: Locking Session.defaultEditingContext() Question
      • From: Juergen Lorenz Simon <email@hidden>
References: 
 >Locking Session.defaultEditingContext() Question (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: Re: [ANN] WOWODC 2008
  • Next by Date: Re: Locking Session.defaultEditingContext() Question
  • Previous by thread: Locking Session.defaultEditingContext() Question
  • Next by thread: Re: Locking Session.defaultEditingContext() Question
  • Index(es):
    • Date
    • Thread