dlr 01/08/15 14:18:54
Modified: src/java/org/apache/torque Torque.java
src/java/org/apache/torque/adapter DBFactory.java
Log:
Switched from Velocity's deprecated Configuration class to Commons
ExtendedProperties.
Revision Changes Path
1.6 +5 -5 jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
Index: Torque.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -u -r1.5 -r1.6
--- Torque.java 2001/08/13 22:32:43 1.5
+++ Torque.java 2001/08/15 21:18:54 1.6
@@ -68,8 +68,8 @@
import org.apache.torque.pool.DBConnection;
import org.apache.torque.util.BasePeer;
+import org.apache.commons.collections.ExtendedProperties;
import org.apache.log4j.Category;
-import org.apache.velocity.runtime.configuration.Configuration;
/**
* Turbine's default implementation of {@link DatabaseService}.
@@ -78,7 +78,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Magn�s ��r Torfason</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Rafal Krzewski</a>
- * @version $Id: Torque.java,v 1.5 2001/08/13 22:32:43 dlr Exp $
+ * @version $Id: Torque.java,v 1.6 2001/08/15 21:18:54 dlr Exp $
*/
public class Torque
{
@@ -110,7 +110,7 @@
private static final String DEFAULT_CATEGORY = "sql";
private static Category category;
- private static Configuration configuration;
+ private static ExtendedProperties configuration;
private static Monitor monitor;
@@ -148,7 +148,7 @@
return category;
}
- public static void setConfiguration(Configuration c)
+ public static void setConfiguration(ExtendedProperties c)
{
configuration = c;
}
@@ -505,7 +505,7 @@
* @throws TorqueException Any exceptions caught during processing will be
* rethrown wrapped into a TorqueException.
*/
- public static DB getDB()
+ public static DB getDB()
throws Exception
{
return getDB(configuration.getString(DATABASE_DEFAULT,"default"));
1.3 +7 -14
jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java
Index: DBFactory.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/adapter/DBFactory.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- DBFactory.java 2001/08/10 12:23:01 1.2
+++ DBFactory.java 2001/08/15 21:18:54 1.3
@@ -58,18 +58,9 @@
import java.util.Hashtable;
import java.util.Vector;
+import org.apache.commons.collections.ExtendedProperties;
import org.apache.log4j.Category;
-import org.apache.velocity.runtime.configuration.Configuration;
-//!!
-// NOTE
-// The Configuration class is used here to try and
-// decouple this from Turbine so that the DatabaseService
-// can be used completely outside of the context of
-// Turbine. I realized this is a yucky Velocity reference
-// in here, but I'm waiting until we have a nice Configuration
-// interface in the commons that we can bind to. jvz.
-
/**
* This class creates different DB objects based on the database
* driver that is provided.
@@ -78,18 +69,20 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Brett McLaughlin</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Ralf Stranzenbach</a>
- * @version $Id: DBFactory.java,v 1.2 2001/08/10 12:23:01 knielsen Exp $
+ * @version $Id: DBFactory.java,v 1.3 2001/08/15 21:18:54 dlr Exp $
*/
public class DBFactory
{
- // List of registered drivers.
+ /**
+ * List of registered drivers.
+ */
private static Hashtable drivers = null;
- private static Configuration configuration;
+ private static ExtendedProperties configuration;
private static Category category;
- public static void setConfiguration(Configuration c)
+ public static void setConfiguration(ExtendedProperties c)
{
configuration = c;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]