tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1293217 - /openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
Date Fri, 24 Feb 2012 12:27:27 GMT
Author: rmannibucau
Date: Fri Feb 24 12:27:27 2012
New Revision: 1293217

URL: http://svn.apache.org/viewvc?rev=1293217&view=rev
Log:
no need to throw an exception is tomee.xml is not found

Modified:
    openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java

Modified: openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java?rev=1293217&r1=1293216&r2=1293217&view=diff
==============================================================================
--- openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
(original)
+++ openejb/trunk/openejb/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomcatLoader.java
Fri Feb 24 12:27:27 2012
@@ -51,7 +51,6 @@ import org.apache.tomee.loader.TomcatHel
 
 import java.io.File;
 import java.io.FileInputStream;
-import java.io.IOException;
 import java.lang.reflect.Field;
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -155,23 +154,11 @@ public class TomcatLoader implements Loa
             return;
         }
 
-        FileInputStream fin = null;
-        File conf = null;
-        // Read in and apply the conf/system.properties
-        try {
-            conf = SystemInstance.get().getBase().getDirectory("conf");
-
-            final File tomeeXml = new File(conf, "tomee.xml");
-            if (tomeeXml.exists()) { // use tomee.xml instead of openejb.xml
-                SystemInstance.get().setProperty("openejb.configuration", tomeeXml.getAbsolutePath());
-                SystemInstance.get().setProperty("openejb.configuration.class", Tomee.class.getName());
-            }
-        } catch (IOException e) {
-            System.out.println("Processing conf/system.properties failed: " + e.getMessage());
-        } finally {
-            if (fin != null) {
-                fin.close();
-            }
+        final File conf = new File(SystemInstance.get().getBase().getDirectory(), "conf");
+        final File tomeeXml = new File(conf, "tomee.xml");
+        if (tomeeXml.exists()) { // use tomee.xml instead of openejb.xml
+            SystemInstance.get().setProperty("openejb.configuration", tomeeXml.getAbsolutePath());
+            SystemInstance.get().setProperty("openejb.configuration.class", Tomee.class.getName());
         }
 
         //Those are set by TomcatHook, why re-set here???



Mime
View raw message