ofbiz-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From doo...@apache.org
Subject svn commit: r918728 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/config/JNDIConfigUtil.java
Date Wed, 03 Mar 2010 22:12:59 GMT
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);
         }
     }
 



Mime
View raw message