openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ppod...@apache.org
Subject svn commit: r608009 - /openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
Date Wed, 02 Jan 2008 05:14:54 GMT
Author: ppoddar
Date: Tue Jan  1 21:14:52 2008
New Revision: 608009

URL: http://svn.apache.org/viewvc?rev=608009&view=rev
Log:
Do not throw exception when failed to lookup JNDI, rather return null. Callers handle null

Modified:
    openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java

Modified: openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=608009&r1=608008&r2=608009&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
(original)
+++ openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
Tue Jan  1 21:14:52 2008
@@ -935,7 +935,11 @@
         name = StringUtils.trimToNull(name);
         if (name == null)
             return null;
-        return Configurations.lookup(name);
+        try {
+        	return Configurations.lookup(name);
+        } catch (Exception ex) {
+        	return null;
+        }
     }
 
     public void setConnection2UserName(String connection2UserName) {



Mime
View raw message