You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2007/01/18 20:51:14 UTC

svn commit: r497550 - /incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java

Author: dblevins
Date: Thu Jan 18 11:51:13 2007
New Revision: 497550

URL: http://svn.apache.org/viewvc?view=rev&rev=497550
Log:
Tightened up exception handling

Modified:
    incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java

Modified: incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java
URL: http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java?view=diff&rev=497550&r1=497549&r2=497550
==============================================================================
--- incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java (original)
+++ incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/alt/config/ConfigurationFactory.java Thu Jan 18 11:51:13 2007
@@ -198,18 +198,21 @@
 
         for (String pathname : jarList) {
 
-            File jarFile = new File(pathname);
+            try {
+                File jarFile = new File(pathname);
 
-            AppInfo appInfo = configureApplication(jarFile);
+                AppInfo appInfo = configureApplication(jarFile);
 
-            sys.containerSystem.applications.add(appInfo);
+                sys.containerSystem.applications.add(appInfo);
+            } catch (OpenEJBException alreadyHandled) {
+            }
         }
 
         return sys;
     }
 
 
-    public AppInfo configureApplication(File jarFile) {
+    public AppInfo configureApplication(File jarFile) throws OpenEJBException {
         logger.debug("Beginning load: " + jarFile.getAbsolutePath());
 
         AppInfo appInfo = null;
@@ -222,8 +225,9 @@
             logger.info("Loaded Module: " + appModule.getJarLocation());
 
         } catch (OpenEJBException e) {
-            e.printStackTrace();
-            logger.i18n.warning("conf.0004", jarFile.getAbsolutePath(), e.getMessage());
+            String message = messages.format("conf.0004", jarFile.getAbsolutePath(), e.getMessage());
+            logger.warning(message);
+            throw e;
         }
         return appInfo;
     }
@@ -268,7 +272,7 @@
 
             } catch (OpenEJBException e) {
                 ConfigUtils.logger.i18n.warning("conf.0004", ejbModule.getJarURI(), e.getMessage());
-                throw e; 
+                throw e;
             }
         }