geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r355914 - /geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Date Sun, 11 Dec 2005 05:03:50 GMT
Author: ammulder
Date: Sat Dec 10 21:03:48 2005
New Revision: 355914

URL: http://svn.apache.org/viewcvs?rev=355914&view=rev
Log:
Merge EJB ref logging enhancement from HEAD

Modified:
    geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java

Modified: geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=355914&r1=355913&r2=355914&view=diff
==============================================================================
--- geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/branches/1.0/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Sat Dec 10 21:03:48 2005
@@ -17,50 +17,32 @@
 
 package org.apache.geronimo.naming.deployment;
 
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Iterator;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.transaction.UserTransaction;
-import javax.xml.namespace.QName;
-
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.NamingContext;
 import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
-import org.apache.geronimo.j2ee.deployment.NamingContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.ClassLoading;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;
+import org.apache.geronimo.xbeans.geronimo.naming.GerCssType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanLocatorType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerCssType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
 import org.apache.geronimo.xbeans.j2ee.EjbRefType;
 import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
 import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
+import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
 import org.apache.geronimo.xbeans.j2ee.ParamValueType;
 import org.apache.geronimo.xbeans.j2ee.PortComponentRefType;
 import org.apache.geronimo.xbeans.j2ee.ResourceEnvRefType;
@@ -69,7 +51,24 @@
 import org.apache.geronimo.xbeans.j2ee.ServiceRefType;
 import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
 import org.apache.geronimo.xbeans.j2ee.XsdStringType;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
+
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.transaction.UserTransaction;
+import javax.xml.namespace.QName;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 /**
  * @version $Rev$ $Date$
@@ -383,10 +382,18 @@
             String ejbRefName = getStringValue(ejbRef.getEjbRefName());
 
             String remote = getStringValue(ejbRef.getRemote());
-            assureEJBObjectInterface(remote, cl);
+            try {
+                assureEJBObjectInterface(remote, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'remote' element for EJB
Reference '"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
+            }
 
             String home = getStringValue(ejbRef.getHome());
-            assureEJBHomeInterface(home, cl);
+            try {
+                assureEJBHomeInterface(home, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'home' element for EJB Reference
'"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
+            }
 
             Reference ejbReference;
             boolean isSession = "Session".equals(getStringValue(ejbRef.getEjbRefType()));
@@ -472,10 +479,18 @@
             String ejbRefName = getStringValue(ejbLocalRef.getEjbRefName());
 
             String local = getStringValue(ejbLocalRef.getLocal());
-            assureEJBLocalObjectInterface(local, cl);
+            try {
+                assureEJBLocalObjectInterface(local, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'local' element for EJB Local
Reference '"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
+            }
 
             String localHome = getStringValue(ejbLocalRef.getLocalHome());
-            assureEJBLocalHomeInterface(localHome, cl);
+            try {
+                assureEJBLocalHomeInterface(localHome, cl);
+            } catch (DeploymentException e) {
+                throw new DeploymentException("Error processing 'local-home' element for
EJB Local Reference '"+ejbRefName+"' for module '"+moduleURI+"': "+e.getMessage());
+            }
 
             boolean isSession = "Session".equals(getStringValue(ejbLocalRef.getEjbRefType()));
 
@@ -641,6 +656,9 @@
     }
 
     public static Class assureInterface(String interfaceName, String superInterfaceName,
String interfaceType, ClassLoader cl) throws DeploymentException {
+        if(interfaceName == null || interfaceName.equals("")) {
+            throw new DeploymentException("interface name cannot be blank");
+        }
         Class clazz = null;
         try {
             clazz = cl.loadClass(interfaceName);



Mime
View raw message