Re: Back To Basics : Databases Active Editing Context
Re: Back To Basics : Databases Active Editing Context
- Subject: Re: Back To Basics : Databases Active Editing Context
- From: Chuck Hill <email@hidden>
- Date: Thu, 3 Jul 2008 16:23:13 -0700
On Jul 3, 2008, at 4:05 PM, Owen McKerrow wrote:
Hi All,
We're still trying to track down the issue with one Editing Context
somehow getting itself permanently attached as the Databases Active
Editing Context. In fact we have an instance of it where it produces
this error :
Cannot obtain globalId for an object which is registered in an other
than the databaseContext's active editingContext, object: Researcher:
(Active_Name=Peter Newnam {rowID=28082;}, databaseContext:
com.webobjects.eoaccess.EODatabaseContext@2cd728, object's
editingContext:
edu.uow.ris.framework.LockErrorScreamerEditingContext@10c6406,
databaseContext's active editingContext:
edu.uow.ris.framework.LockErrorScreamerEditingContext@1efaa51
And then keept the session alive for 24 hours ( at which point we
restarted Tomcat) and was considered the active editing context for
that whole time, which meant that no one else could log into the
system, thankfully this was on our Test Server.
So Im going back to basics, just in case I missed something or my
understanding of these things is flawed :
1) What exactly is the Databases active editing context ?
The editing context that is executing saveChanges() and has the
database (EODatabaseContext) locked.
2) How/When does a EC become the databases active editing context ?
Someplace inside of saveChanges() after / when it locks the DBContext
3) How/When is it no longer considered the databases active editing
context ?
When the save finished (with or without error) and the EC unlocks the
DBContext
4) Should it be possible for an EC to be the active one across
multiple RR Loops ? And if so why ?
No.
5) Is there only one databases active editing context for each
instance of the application or is it one per session ?
There will be zero or one per EOF stack. Usually there is one EOF
stack per instance.
Pierre Frisch and I were looking at this during WWDC. We came to the
conclusion that the error you are seeing is not possible :-) except
when you form relationships across editing contexts. I recall that
you have checked this and verified that you are not doing this. Well,
not quite not possible. The only thing we could come up with is that
Java is running out of memory during saveChanges() and leaving EOF in
an insane state. Your description above fits this theory exactly. It
does not at all fit the "relationships across editing contexts"
theory. Have you checked the app logs of OutOfMemory and message
about heap space?
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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