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 2009/08/05 04:07:00 UTC

svn commit: r801044 - in /openejb/trunk/openejb3/container/openejb-core/src/main: java/org/apache/openejb/config/AnnotationDeployer.java resources/org/apache/openejb/util/resources/Messages.properties

Author: dblevins
Date: Wed Aug  5 02:06:59 2009
New Revision: 801044

URL: http://svn.apache.org/viewvc?rev=801044&view=rev
Log:
Stronger error checking on creating a ClassFinder for client modules

Modified:
    openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
    openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=801044&r1=801043&r2=801044&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java Wed Aug  5 02:06:59 2009
@@ -302,8 +302,8 @@
             ClassFinder finder = clientModule.getFinder();
 
             if (finder == null) {
-                if (clientModule.getJarLocation() != null) {
-                    try {
+                try {
+                    if (clientModule.getJarLocation() != null) {
                         String location = clientModule.getJarLocation();
                         File file = new File(location);
 
@@ -314,17 +314,15 @@
                             url = new URL(location);
                         }
                         finder = new ClassFinder(clientModule.getClassLoader(), url);
-                    } catch (MalformedURLException e) {
-                        startupLogger.warning("startup.scrapeFailedForModule", clientModule.getJarLocation());
-                        return clientModule;
-                    }
-                } else {
-                    try {
+                    } else {
                         finder = new ClassFinder(clientModule.getClassLoader());
-                    } catch (Exception e) {
-                        startupLogger.warning("Unable to scrape for @LocalClient or @RemoteClient annotations. ClassFinder failed.", e);
-                        return clientModule;
                     }
+                } catch (MalformedURLException e) {
+                    startupLogger.warning("startup.scrapeFailedForClientModule.url", clientModule.getJarLocation());
+                    return clientModule;
+                } catch (Exception e) {
+                    startupLogger.warning("startup.scrapeFailedForClientModule", e, clientModule.getJarLocation());
+                    return clientModule;
                 }
             }
 

Modified: openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties?rev=801044&r1=801043&r2=801044&view=diff
==============================================================================
--- openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties (original)
+++ openejb/trunk/openejb3/container/openejb-core/src/main/resources/org/apache/openejb/util/resources/Messages.properties Wed Aug  5 02:06:59 2009
@@ -43,6 +43,8 @@
 startup.ready=OpenEJB Container System ready.
 startup.noContainersConfigured=Attemtped to access containers where none are configured.
 startup.scrapeFailedForModule=Unable to scrape for @Stateful, @Stateless or @MessageDriven annotations. Invalid EjbModule URL: {0}
+startup.scrapeFailedForClientModule=Unable to scrape for @LocalClient or @RemoteClient annotations.  ClientModule: {0}
+startup.scrapeFailedForClientModule.url=Unable to scrape for @LocalClient or @RemoteClient annotations.  Invalid ClientModule URL: {0}
 startup.beanInstanceSystemExceptionThrown=The bean instance business method encountered a system exception: {0}
 
 #