You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by to...@apache.org on 2004/12/05 18:47:21 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker ConfigurationException.java ContainerHelper.java PersistenceBrokerInternal.java
tomdz 2004/12/05 09:47:21
Modified: src/java/org/apache/ojb/broker/core
PersistenceBrokerImpl.java
DelegatingPersistenceBroker.java
src/java/org/apache/ojb/broker ConfigurationException.java
ContainerHelper.java PersistenceBrokerInternal.java
Log:
Fixed component container exception that were issued when using the new ManageableListImpl class in queries
Added setSqlInLimit to PersistenceBrokerInternal so that it is a full bean property of it, and changed its wiring the ContainerHelper accordingly
Made the ConfigurationException a runtime exception
Revision Changes Path
1.105 +11 -1 db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java
Index: PersistenceBrokerImpl.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java,v
retrieving revision 1.104
retrieving revision 1.105
diff -u -r1.104 -r1.105
--- PersistenceBrokerImpl.java 5 Dec 2004 12:31:00 -0000 1.104
+++ PersistenceBrokerImpl.java 5 Dec 2004 17:47:21 -0000 1.105
@@ -17,6 +17,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -2098,6 +2099,15 @@
*/
public ManageableCollection createCollection(Class collectionClass)
{
+ if (!collectionClass.isInterface() && !Modifier.isAbstract(collectionClass.getModifiers()))
+ {
+ try
+ {
+ return (ManageableCollection)collectionClass.newInstance();
+ }
+ catch (Exception ex)
+ {}
+ }
return (ManageableCollection)subContainer.getInstance(collectionClass);
}
1.17 +10 -1 db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java
Index: DelegatingPersistenceBroker.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/DelegatingPersistenceBroker.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- DelegatingPersistenceBroker.java 1 Dec 2004 20:08:27 -0000 1.16
+++ DelegatingPersistenceBroker.java 5 Dec 2004 17:47:21 -0000 1.17
@@ -407,11 +407,20 @@
getBroker().addMtoNImplementor(m2nImpl);
}
- /**
+ /*
+ * (non-Javadoc)
* @see org.apache.ojb.broker.PersistenceBrokerInternal#getSqlInLimit()
*/
public int getSqlInLimit()
{
return getBroker().getSqlInLimit();
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ojb.broker.PersistenceBrokerInternal#setSqlInLimit(int)
+ */
+ public void setSqlInLimit(int maxNum)
+ {
+ getBroker().setSqlInLimit(maxNum);
}
}
1.2 +2 -4 db-ojb/src/java/org/apache/ojb/broker/ConfigurationException.java
Index: ConfigurationException.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/ConfigurationException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConfigurationException.java 11 Aug 2004 00:41:49 -0000 1.1
+++ ConfigurationException.java 5 Dec 2004 17:47:21 -0000 1.2
@@ -1,7 +1,5 @@
package org.apache.ojb.broker;
-import org.apache.ojb.broker.OJBException;
-
/* Copyright 2002-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,7 +21,7 @@
* @author <a href="mailto:arminw@apache.org">Armin Waibel</a>
* @version $Id$
*/
-public class ConfigurationException extends OJBException
+public class ConfigurationException extends OJBRuntimeException
{
public ConfigurationException()
{
1.3 +1 -1 db-ojb/src/java/org/apache/ojb/broker/ContainerHelper.java
Index: ContainerHelper.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/ContainerHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ContainerHelper.java 15 Nov 2004 22:51:40 -0000 1.2
+++ ContainerHelper.java 5 Dec 2004 17:47:21 -0000 1.3
@@ -182,7 +182,7 @@
ImplementationImpl.class.getName() + ".oqlCollectionClass");
_translationMap.put("SqlInLimit",
- PersistenceBrokerImpl.class.getName() + ".sqlInLimit");
+ PersistenceBrokerInternal.class.getName() + ".sqlInLimit");
_translationMap.put("PersistentFieldClass",
PersistentField.class.getName()+".class");
1.4 +10 -2 db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerInternal.java
Index: PersistenceBrokerInternal.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/PersistenceBrokerInternal.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- PersistenceBrokerInternal.java 1 Dec 2004 20:08:27 -0000 1.3
+++ PersistenceBrokerInternal.java 5 Dec 2004 17:47:21 -0000 1.4
@@ -70,8 +70,16 @@
public Object createProxy(Class proxyClass, Identity realSubjectsIdentity);
/**
- * @return the maximum number of values in the SQL IN-clause.
+ * Returns the maximum number of values in the SQL IN-clause.
+ *
+ * @return The maximum number of values
*/
public int getSqlInLimit();
+ /**
+ * Sets the maximum number of values in the SQL IN-clause.
+ *
+ * @param maxNum The maximum number of values
+ */
+ public void setSqlInLimit(int maxNum);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org