[jboss-cvs] JBossAS SVN: r92307 - projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Aug 13 09:53:00 EDT 2009


Author: jaikiran
Date: 2009-08-13 09:53:00 -0400 (Thu, 13 Aug 2009)
New Revision: 92307

Modified:
   projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java
Log:
EJBTHREE-1884 Minor changes to exception handling/reporting

Modified: projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java
===================================================================
--- projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java	2009-08-13 13:03:33 UTC (rev 92306)
+++ projects/ejb3/trunk/proxy-impl/src/main/java/org/jboss/ejb3/proxy/impl/objectfactory/ProxyObjectFactory.java	2009-08-13 13:53:00 UTC (rev 92307)
@@ -141,12 +141,10 @@
                   + " was expected to be of type " + ProxyFactory.class.getName() + " but was instead " + pfObj;
             proxyFactory = (ProxyFactory) pfObj;
          }
-         // BES 2008/08/22 -- a NotBoundException doesn't mean failure, just
-         // means the container isn't deployed in this server. So don't catch it
-         // in an inner try/catch; let it propagate to the outer catch.
          catch (NotBoundException nbe)
          {
-            proxyFactory = this.getProxyFactoryFromJNDI(proxyFactoryRegistryKey, nameCtx, environment);
+            throw new RuntimeException("Could not find proxyfactory at " + proxyFactoryRegistryKey
+                  + " -looking up local Proxy from Remote JVM?", nbe);
          }
       }
       // Registrar is not local, so use Remoting to Obtain Proxy Factory
@@ -232,14 +230,9 @@
 
          return (ProxyFactory) factory;
       }
-      catch (NameNotFoundException nnfe)
-      {
-         throw new RuntimeException("Could not find proxyfactory in JNDI at " + proxyFactoryKey
-               + " -looking up local Proxy from Remote JVM?");
-      }
       catch (NamingException e)
       {
-         throw new RuntimeException("Exception while trying to locate proxy factory in JNDI, at key " + proxyFactoryKey);
+         throw new RuntimeException("Exception while trying to locate proxy factory in JNDI, at key " + proxyFactoryKey, e);
       }
 
    }




More information about the jboss-cvs-commits mailing list