db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Georg Schneider <schnei...@imp.univie.ac.at>
Subject bug when locking objects with references to proxies
Date Wed, 11 Aug 2004 08:57:06 GMT
Hi all,

It has been quite a while since I have posted to this list. We have been
using version 0.95 (I know that is the stone ages) up until now and I
now have upgraded to 1.0.

While doing that I noticed that the performance was really bad and I
searched for the reason. We are using a lot of objects that have
references to other, proxied objects and when looking at the database
logs I noticed that these proxies were constantly materialized.

I narrowed down the problem to the method assertFkAssignment(...) in

             if (!ProxyHelper.isProxy(obj) && (ref != null))
                 Object refInstance = ProxyHelper.getRealObject(ref);

The preceeding code checks if the object on which the FKs are set is not
a proxy and the reference is not null and then it immediately
materializes the proxy, making a proxy useless. Besides the code a few
lines down

refPkValues = getBroker().serviceBrokerHelper().getKeyValues(refCld,
refInstance, false);

perfectly handles proxies anyway because getKeyValues(...) in
BrokerHelper doesn't materialize if refInstance is a proxy.

I changed the code correspondingly and now it is up to the usual speed.

Could you please tell me if I am correct or if there is something I
don't see.



Georg Schneider
Bioinformatics Group
Research Institute of Molecular Pathology (IMP)
Dr. Bohr Gasse 7
A-1030 Vienna

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message