db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilkka Priha <ipr...@norther.org>
Subject Compatibility problems between 1.0.3 and 1.0.4_rc
Date Wed, 28 Sep 2005 07:36:52 GMT

We've just tested our apps against the 1.0.4 CVS snapshot and found some 
unexpected changes. Our apps are typically divided into several databases on 
various platforms and not any one of them is considered the "default". In 
earlier versions of OJB this has worked fine, only one INFO message has been 
logged during initialization reminding about the missing default connection.

In 1.0.4_rc, a zillion copies of the same INFO message is logged during run-time 
as ProxyHelper tries to get a default broker during every query, even though the 
query has been invoked from a valid broker with an explicit connection alias. 
Another consequence is a new dependency to CGLib.jar as ProxyHelper doesn't get 
the configured JDK proxy factory, but uses the hardcoded one.

An easy work-around is to define any one of the connections to be the default 
one, but a more downward compatible solution would be to make ProxyHelper to get 
the proxy factory directly from AbstractProxyFactory instead of the default 
broker as that's the way how PersistanceBrokerImpl gets its own one. I suppose 
ProxyFactory is a global setting, and even if it wasn't, the current solution 
still always applies the default one.

- Ilkka

Index: ProxyHelper.java
RCS file: 
retrieving revision
diff -u -r1.2.2.5 ProxyHelper.java
--- ProxyHelper.java	5 Sep 2005 10:59:30 -0000
+++ ProxyHelper.java	28 Sep 2005 07:29:26 -0000
@@ -36,7 +36,7 @@
-                proxyFactoryRef = new SoftReference(getBroker().getProxyFactory());
+                proxyFactoryRef = new 
              catch (PBFactoryException ex)

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

View raw message