Re: Snapshot Question
Re: Snapshot Question
- Subject: Re: Snapshot Question
- From: Andrew Lindesay <email@hidden>
- Date: Thu, 10 May 2007 08:46:50 +1200
Hello Chuck;
I finally got those changes into a production-deploy and sadly the
problem persists.
So I know the EC involved from user requests is being locked by the
request-handler and at the same time I am manually locking the OSC in
the background thread.
I wonder, in my background thread, should I be creating an artificial
EC from the OSC and locking that for some reason or should it be
enough to lock the OSC directly? I suppose this is a case of it
being nice to be able to see the EOF source code!
Do you have any other sage advice?
cheers.
I'm getting an error at...
at ..EODatabaseOperation.rowDiffsForAttributes
(EODatabaseOperation.java:338)
at ..EODatabaseContext.createAdaptorOperationsForDatabaseOperationAt
tributes(EODatabaseContext.java:5373)
at ..EODatabaseContext.createAdaptorOperationsForDatabaseOperation
(EODatabaseContext.java:5548)
at ..EODatabaseContext.performChanges(EODatabaseContext.java:6365)
at ..EOObjectStoreCoordinator.saveChangesInEditingContext
(EOObjectStoreCoordinator.java:415)
at ..EOEditingContext.saveChanges(EOEditingContext.java:3226)
...which looks a bit like this (entity name changed)...
rowDiffsForAttributes: snapshot in
com.webobjects.eoaccess.EODatabaseOperation
{_dbSnapshot = {};
That is the snapshot that it is complaining about. Notice that it
has _no_ values in it. It is missing a snapshot for this object.
articleBody just happens to be the first attribute it looked for.
I have had this happen several times to me, it was always bad EOF
locking that caused it.
_entity = "MyEntity"; _newRow =
{
...
articleBody = <com.webobjects.foundation.NSKeyValueCoding$Null>;
...
};
_object = "{values = {
...
articleBody = <com.webobjects.foundation.NSKeyValueCoding$Null>;
...
};
this = "<nz.co.chong.cbw.eo.CBClip 8e67d8 _EOIntegralKeyGlobalID
[CBClip (java.lang.Integer)1637467]>"; }";
_globalID = _EOIntegralKeyGlobalID[MyEntity (java.lang.Integer)
1637467]; _databaseOperator = "EODatabaseUpdateOperator";
}
does not contain value for attribute named articleBody with
snapshot key: articleBody
Which is confusing because "articleBody" seems to be there in the
snap. It can't be marshalling its optimistic locking because
there is none on the "articleBody" attribute. It must be looking
to see if there is a change in order to turn that change into
adaptor operations. I'm using...
forgetSnapshotForGlobalID(...)
recordSnapshotForSourceGlobalID(null, gidA, rA.name());
... on EODatabase as discussed some weeks ago here for change
notification.
Are you locking the object store co-ordinator before doing this?
EC locking is not enough here.
I'm pretty sure that I am locking the EODatabaseContext for the
entity appropriately before dropping snapshots. I assume that
"EOObjectStoreCoordinator" must also lock the database context
before "performChanges(...)".
I think you need to lock up at the OSC level, I could be wrong.
It is highly likely that two users of the WOA are trying to edit
the same data at the same time here. Anything I've obviously
forgotten?
That is all that comes to mind at the moment.
___
Andrew Lindesay
technology : www.lindesay.co.nz
business : www.silvereye.co.nz
_______________________________________________
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