geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r538671 - in /geronimo/server/trunk/modules: geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/ geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ geronimo-jaxws-builder/src/main/java/org/a...
Date Wed, 16 May 2007 18:01:48 GMT
Author: dwoods
Date: Wed May 16 11:01:37 2007
New Revision: 538671

URL: http://svn.apache.org/viewvc?view=rev&rev=538671
Log:
GERONIMO-348 Invalid module path or references in plan should result in failed deployment.

Modified:
    geronimo/server/trunk/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
    geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
    geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java

Modified: geronimo/server/trunk/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java?view=diff&rev=538671&r1=538670&r2=538671
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis-builder/src/main/java/org/apache/geronimo/axis/builder/AxisServiceRefBuilder.java
Wed May 16 11:01:37 2007
@@ -77,7 +77,12 @@
             String name = getStringValue(serviceRef.getServiceRefName());
             addInjections(name, serviceRef.getInjectionTargetArray(), componentContext);
             GerServiceRefType serviceRefType = (GerServiceRefType) serviceRefMap.get(name);
+            serviceRefMap.remove(name);
             buildNaming(serviceRef, serviceRefType, module, componentContext);
+        }
+
+        if (serviceRefMap.size() > 0) {
+            throw new DeploymentException("Failed to build reference to service reference
"+serviceRefMap.keySet()+" defined in plan file, reason - corresponding entry in deployment
descriptor missing.");
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java?view=diff&rev=538671&r1=538670&r2=538671
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Wed May 16 11:01:37 2007
@@ -140,6 +140,7 @@
                 throw new DeploymentException("could not load class " + type, e);
             }
             GerResourceEnvRefType gerResourceEnvRef = refMap.get(name);
+            refMap.remove(name);
             try {
                 String refType = getStringValue(resourceEnvRef.getResourceEnvRefType());
                 if (refType.equals("javax.transaction.UserTransaction")) {
@@ -154,7 +155,11 @@
                 throw new DeploymentException("Unable to resolve resource env reference '"
+ name + "' (" + (e.isMultiple() ? "found multiple matching resources" : "no matching resources
found") + ")");
             }
         }
-
+        
+        if (refMap.size() > 0) {
+            throw new DeploymentException("Failed to build reference to Admin object reference
"+refMap.keySet()+" defined in plan file, reason - corresponding entry in deployment descriptor
missing.");
+        }
+        
         //message-destination-refs
         List<MessageDestinationRefType> messageDestinationRefsUntyped = convert(specDD.selectChildren(messageDestinationRefQNameSet),
JEE_CONVERTER, MessageDestinationRefType.class, MessageDestinationRefType.type);
 

Modified: geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java?view=diff&rev=538671&r1=538670&r2=538671
==============================================================================
--- geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
Wed May 16 11:01:37 2007
@@ -121,6 +121,7 @@
             addInjections(name, resourceRef.getInjectionTargetArray(), componentContext);
             String type = resourceRef.getResType().getStringValue().trim();
             GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(name);
+            refMap.remove(name);
             Class iface;
             try {
                 iface = cl.loadClass(type);
@@ -198,6 +199,9 @@
             }
         }
 
+        if (refMap.size() > 0) {
+            throw new DeploymentException("Failed to build reference to resource reference
"+refMap.keySet()+" defined in plan file, reason - corresponding entry in deployment descriptor
missing.");
+        }
     }
 
     public void setResourceEnvironment(ResourceEnvironmentBuilder builder, XmlObject[] resourceRefs,
GerResourceRefType[] gerResourceRefs) throws DeploymentException {

Modified: geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java?view=diff&rev=538671&r1=538670&r2=538671
==============================================================================
--- geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSServiceRefBuilder.java
Wed May 16 11:01:37 2007
@@ -74,9 +74,13 @@
             String name = getStringValue(serviceRef.getServiceRefName());            
             addInjections(name, serviceRef.getInjectionTargetArray(), componentContext);
             GerServiceRefType serviceRefType = (GerServiceRefType) serviceRefMap.get(name);
-            
+            serviceRefMap.remove(name);
             buildNaming(serviceRef, serviceRefType, module, componentContext);
         }        
+
+        if (serviceRefMap.size() > 0) {
+            throw new DeploymentException("Failed to build reference to service reference
"+serviceRefMap.keySet()+" defined in plan file, reason - corresponding entry in deployment
descriptor missing.");
+        }
     }
 
     private Class loadClass(String className, ClassLoader cl, String classDescription) throws
DeploymentException {

Modified: geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java?view=diff&rev=538671&r1=538670&r2=538671
==============================================================================
--- geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-naming-builder/src/main/java/org/apache/geronimo/naming/deployment/SwitchingServiceRefBuilder.java
Wed May 16 11:01:37 2007
@@ -112,8 +112,8 @@
                     serviceRef, JEE_CONVERTER, ServiceRefType.type);
 
             String name = getStringValue(serviceRefType.getServiceRefName());
-            GerServiceRefType gerServiceRefType = (GerServiceRefType) serviceRefMap
-                    .get(name);
+            GerServiceRefType gerServiceRefType = (GerServiceRefType) serviceRefMap.get(name);
+            serviceRefMap.remove(name);
 
             String serviceInterfaceName = getStringValue(serviceRefType
                     .getServiceInterface());
@@ -138,6 +138,10 @@
                         + jaxrpcClass.getName() + " or "
                         + jaxwsClass.getName());
             }
+        }
+
+        if (serviceRefMap.size() > 0) {
+            throw new DeploymentException("Failed to build reference to service reference
"+serviceRefMap.keySet()+" defined in plan file, reason - corresponding entry in deployment
descriptor missing.");
         }
     }
 



Mime
View raw message