As nobody else seems to respond some comments from a user's experience
with OJB's ODMG implementation:

On Fri, 17 Oct 2003 10:26:52 -0400, "Weaver, Scott"
<[EMAIL PROTECTED]> wrote:

>
>1.  Should collections for 1:n relationships be updated automatically?
>
>Example:  I have a class "foo" which has a collection of "bars".  The bar class has a 
>corresponding reference to its parent "foo."  If I create a new bar, do a 
>bar.setFoo(fooInstance) and save that bar, should I expect fooInstance's bar 
>collection to be updated with that bar automatically?  From what I have seen (in 
>ODMG) this is not the case, unless I have refresh="true", which can be costly when 
>speaking in terms of large numbers of bar records.
>

IMO a bar.SetFoo(fooInstance) without a corresponding
fooInstance.addBar(bar) puts the object model into an inconsistent
state and it probably is undefined what an ODMG implementation should
do in this case. 

>2. ODMG updates.
>
>I have noticed that, with complex objects graphs, ODMG updates tend to be 
>unacceptably long (upwards to 15 to 30 seconds), even if 98% of the graph was not 
>changed during the transaction.  Is this to be expected?  Is ODMG actually traversing 
>my entire object graph looking for changed objects through reachability?  That means 
>OJB/ODMG would have to be materializing all collection descriptors/references 
>throughout the object graph to check for changes (which, consequently, have not 
>happened since the proxy hadn't been materialized yet).  This would negate the 
>usefulness of the proxy attribute.  Or is OJB smart enough to realize that 
>non-materialized proxy collections should not be checked for changes, since they 
>obviously have never been accessed?  Any suggestions on this?  I would use straight 
>pb with auto-updates customized for performance, but it seems, at least with my 
>version of rc4, auto-update gets ignored in certain instances.
>

OJB indeed has to traverse the object graph, already when propagating
locks. This does not mean that proxies have to be materialized,
though, because as long as a proxy has not been materialized, the
proxied object cannot have been changed by the current transaction. 

But for some reason I don't understand, OJB materializes the first
level of referenced objects, when a lock is placed on an object
explicitly. Some time ago I placed a question about this into this
list but got no answer.

>3.  auto-delete=true and ODMG
>
>I know the docs say you should not use auto-delete with ODMG.  However, I have seen 
>posts to the list that say it can be used safely.  With the current version of rc4 I 
>have, it appears that ODMG is ignoring the auto-delete="true" entirely.  Is this to 
>be expected?
>

No idea on this one.

Regards,
Gerhard

>
>Thanks,
> ________________________________
>|                                |
>| Scott T Weaver                 |
>| <[EMAIL PROTECTED]>            | 
>| Apache Jetspeed Portal Project |
>| Apache Pluto Portlet Container |
>|________________________________|



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to