svn commit: r918728 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r918728 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java

doogie-3
Author: doogie
Date: Wed Mar  3 22:12:58 2010
New Revision: 918728

URL: http://svn.apache.org/viewvc?rev=918728&view=rev
Log:
Implement proper non-blocking access.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java?rev=918728&r1=918727&r2=918728&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java Wed Mar  3 22:12:58 2010
@@ -35,7 +35,7 @@
 
     public static final String module = JNDIConfigUtil.class.getName();
     public static final String JNDI_CONFIG_XML_FILENAME = "jndiservers.xml";
-    private static final Map<String, JndiServerInfo> jndiServerInfos = FastMap.newInstance();
+    private static final FastMap<String, JndiServerInfo> jndiServerInfos = FastMap.newInstance();
 
     private static Element getXmlRootElement() throws GenericConfigException {
         try {
@@ -65,7 +65,7 @@
         for (Element curElement: UtilXml.childElementList(rootElement, "jndi-server")) {
             JndiServerInfo jndiServerInfo = new JndiServerInfo(curElement);
 
-            jndiServerInfos.put(jndiServerInfo.name, jndiServerInfo);
+            jndiServerInfos.putIfAbsent(jndiServerInfo.name, jndiServerInfo);
         }
     }