tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r503983 - /incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
Date Tue, 06 Feb 2007 04:59:27 GMT
Author: dblevins
Date: Mon Feb  5 20:59:26 2007
New Revision: 503983

URL: http://svn.apache.org/viewvc?view=rev&rev=503983
Log:
check for null (i.e. use of the other constructor)

Modified:
    incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java?view=diff&rev=503983&r1=503982&r2=503983
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
(original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/assembler/classic/JndiEncBuilder.java
Mon Feb  5 20:59:26 2007
@@ -69,7 +69,7 @@
         this(jndiEnc, null, null, null,null);
     }
 
-    public JndiEncBuilder(JndiEncInfo jndiEnc, String transactionType, BeanType ejbType,
Map<String, Map<String, EntityManagerFactory>> allFactories,String path) throws
OpenEJBException {
+    public JndiEncBuilder(JndiEncInfo jndiEnc, String transactionType, BeanType ejbType,
Map<String, Map<String, EntityManagerFactory>> allFactories, String path) throws
OpenEJBException {
         if (ejbType == null){
             referenceWrapper = new DefaultReferenceWrapper();
         } else if (ejbType.isEntity()) {
@@ -85,11 +85,15 @@
         }
 
         beanManagedTransactions = transactionType != null && transactionType.equalsIgnoreCase("Bean");
-        try {
-            path = new File(path).toURL().getPath();
-        } catch (MalformedURLException e) {
-            throw new org.apache.openejb.OpenEJBException("The module path is invalid " +
path , e);
+
+        if (path != null){
+            try {
+                path = new File(path).toURL().getPath();
+            } catch (MalformedURLException e) {
+                throw new org.apache.openejb.OpenEJBException("The module path is invalid
" + path , e);
+            }
         }
+        
         this.jarPath = path;
         this.jndiEnc = jndiEnc;
 



Mime
View raw message