henning 2003/06/22 12:33:35
Modified: src/java/org/apache/torque TorqueSingleton.java
Log:
- Torque should declare itself not initialized once it has shut down.
- Clean out variables that should no longer contain information once
Torque has been shut down.
Revision Changes Path
1.2 +15 -5 db-torque/src/java/org/apache/torque/TorqueSingleton.java
Index: TorqueSingleton.java
===================================================================
RCS file: /home/cvs/db-torque/src/java/org/apache/torque/TorqueSingleton.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TorqueSingleton.java 21 Jun 2003 11:48:29 -0000 1.1
+++ TorqueSingleton.java 22 Jun 2003 19:33:35 -0000 1.2
@@ -161,9 +161,7 @@
*/
private TorqueSingleton()
{
- mapBuilders = Collections.synchronizedList(new ArrayList());
- managers = new HashMap();
- isInit = false;
+ resetConfiguration();
}
/**
@@ -568,7 +566,7 @@
* This method halts the IDBroker's daemon thread in all of
* the DatabaseMap's.
*/
- public void shutdown()
+ public synchronized void shutdown()
{
if (dbMaps != null)
{
@@ -583,6 +581,18 @@
}
}
}
+ resetConfiguration();
+ }
+
+ /**
+ * Resets some internal configuration variables to
+ * their defaults.
+ */
+ private void resetConfiguration()
+ {
+ mapBuilders = Collections.synchronizedList(new ArrayList());
+ managers = new HashMap();
+ isInit = false;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]