db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tfisc...@apache.org
Subject svn commit: r1147194 - /db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
Date Fri, 15 Jul 2011 15:35:46 GMT
Author: tfischer
Date: Fri Jul 15 15:35:45 2011
New Revision: 1147194

URL: http://svn.apache.org/viewvc?rev=1147194&view=rev
Log:
TORQUE-163: Do not empty map builders on shutdown

Modified:
    db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java

Modified: db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java?rev=1147194&r1=1147193&r2=1147194&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
(original)
+++ db/torque/torque4/trunk/torque-runtime/src/main/java/org/apache/torque/TorqueInstance.java
Fri Jul 15 15:35:45 2011
@@ -99,7 +99,9 @@ public class TorqueInstance
      * are serialized then unserialized prior to Torque being reinitialized.
      * This condition exists in a normal catalina restart.
      */
-    private Map<String, MapBuilder> mapBuilderCache = null;
+    private Map<String, MapBuilder> mapBuilderCache 
+            = Collections.synchronizedMap(new HashMap<String, MapBuilder>());
+;
 
     /**
      * Creates a new instance with default configuration.
@@ -114,7 +116,7 @@ public class TorqueInstance
     /**
      * Initializes this instance of Torque.
      *
-     * @throws TorqueException if Torque is already initialized 
+     * @throws TorqueException if Torque is already initialized
      *         or an error during initialization occurs.
      */
     private synchronized void initialize() throws TorqueException
@@ -748,8 +750,6 @@ public class TorqueInstance
      */
     private void resetConfiguration()
     {
-        mapBuilderCache = Collections.synchronizedMap(
-                new HashMap<String, MapBuilder>());
         managers = new HashMap<String, AbstractBaseManager>();
         isInit = false;
     }



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


Mime
View raw message