• 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: "Cannot obtain globalId for an object which..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Cannot obtain globalId for an object which..."


  • Subject: Re: "Cannot obtain globalId for an object which..."
  • From: Kaj Hejer <email@hidden>
  • Date: Tue, 10 Jun 2003 22:37:46 +0200

At 12:56 -0700 10-06-2003, Chuck Hill wrote:
Hi Kaj,

First off,
 I also get a bit confused about what "databaseContext's active
 editingContext" mean.

When an EC starts to do anything outside of its sandbox (fetching and saving), it locks the database context(s) that it is using. Only one EC can lock a database context at a time. When an EC locks a database context that EC becomes the database context's active editing context.


Is it possible that this has been related, in code, to an Pasient in a different editing context?


Hi!

Thanks again for answering!

Now I have done some digging! :)

It seems like this problem started after we for some reason got a nullpointer exception while editing, and after that every time we call the getPasienterWithPrefetch method the databaseContext's active editingContext is the same.

Here is the output from three different calls to this method:


com.webobjects.eoaccess.EODatabaseContext@2613f8, object's editingContext: com.webobjects.eocontrol.EOEditingContext@6f2b35, databaseContext's active editingContext: com.webobjects.eocontrol.EOEditingContext@1b9a30


com.webobjects.eoaccess.EODatabaseContext@2613f8, object's editingContext: com.webobjects.eocontrol.EOEditingContext@55a27, databaseContext's active
editingContext: com.webobjects.eocontrol.EOEditingContext@1b9a30


com.webobjects.eoaccess.EODatabaseContext@2613f8, object's editingContext: com.webobjects.eocontrol.EOEditingContext@312262, databaseContext's active editingContext: com.webobjects.eocontrol.EOEditingContext@1b9a30


The object's editingContext differ since that is session.defaultEditingContext, but the databaseContext's active editingContext is the same and i guess that is because of the locking you describe.


The more I learn, the more questions I got ;-)

Now I wonder how I can release the database context's active editing context, and what is the best way of handling this type of issues. I guess it should be handled when we get the excepion from saveChanges that seems to have triggered this whole thing.

Is there anything in the WO domnentation somewhere about what you write about database context's active editing context? Just curious. If it's not, I mayme should file a enhancement report at bugreport.apple.com.


-kaj :) _______________________________________________ webobjects-dev mailing list | email@hidden Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "Cannot obtain globalId for an object which..."
      • From: Alan Ward <email@hidden>
    • Re: "Cannot obtain globalId for an object which..."
      • From: Chuck Hill <email@hidden>
References: 
 >"Cannot obtain globalId for an object which..." (From: Kaj Hejer <email@hidden>)
 >Re: "Cannot obtain globalId for an object which..." (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: "Cannot obtain globalId for an object which..."
  • Next by Date: Re: "Cannot obtain globalId for an object which..."
  • Previous by thread: Re: "Cannot obtain globalId for an object which..."
  • Next by thread: Re: "Cannot obtain globalId for an object which..."
  • Index(es):
    • Date
    • Thread