Hello
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:
/home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/core/proxy/Attic/ProxyHelper.java,v
retrieving revision 1.2.2.5
diff -u -r1.2.2.5 ProxyHelper.java
--- ProxyHelper.java 5 Sep 2005 10:59:30 -0000 1.2.2.5
+++ ProxyHelper.java 28 Sep 2005 07:29:26 -0000
@@ -36,7 +36,7 @@
{
try
{
- proxyFactoryRef = new
SoftReference(getBroker().getProxyFactory());
+ proxyFactoryRef = new
SoftReference(AbstractProxyFactory.getProxyFactory());
}
catch (PBFactoryException ex)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]