db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <a...@jpox.org>
Subject Re: Lifecycle listener events concerning store/delete
Date Wed, 23 Nov 2005 11:11:13 GMT
Hi Michael,

> Is the different event handling concerning relationships intentional?

Impossible to comment without having a case in front of me that I can see what 
is being performed. I dont know what relationships you have between those 
objects and what is having makePersistent/deletePersistent called on it at 
what point in the listing. 

JPOX doesn't have any "different handling" for particular cases. It simply 
fires events when an object is migrated between states. 

When no relationships are involved then the events will always go in pairs 
since nothing else is happening in between. It doesn't have to navigate 
around to anything related to check if it should update that too.

When relationships are involved then it may start doing something and find 
that the field has a related object, so has to navigate through the field and 
perform the necessary operation on the related object. Consequently the other 
object will likely finish its operation before the original object finishes, 
and so the events won't go in pairs necessarily. For example, if you ask to 
delete an object, and it has a related field that  has changes not yet 
flushed to the datastore, then the store events will then get fired on that, 
before any delete happens on the requested object.

Java Persistent Objects - JPOX

View raw message