geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vamsic...@apache.org
Subject svn commit: r572902 - in /geronimo/server: branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ trunk/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/
Date Wed, 05 Sep 2007 09:01:02 GMT
Author: vamsic007
Date: Wed Sep  5 02:01:00 2007
New Revision: 572902

URL: http://svn.apache.org/viewvc?rev=572902&view=rev
Log:
GERONIMO-3248 Extraneous WARN messages during deployment of resource-env-refs in EJB jar
 o Thanks Manu for providing the patch
 o Thanks Aman for confirming the fix

Modified:
    geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
    geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.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

Modified: geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java?rev=572902&r1=572901&r2=572902&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/AdminObjectRefBuilder.java
Wed Sep  5 02:01:00 2007
@@ -113,6 +113,7 @@
     public void buildNaming(XmlObject specDD, XmlObject plan, Module module, Map componentContext)
throws DeploymentException {
         XmlObject[] gerResourceEnvRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_ADMIN_OBJECT_REF_QNAME_SET);
         Map<String, GerResourceEnvRefType> refMap = mapResourceEnvRefs(gerResourceEnvRefsUntyped);
+        int initialGerRefSize = refMap.size();
         Map<String, Map<String, GerMessageDestinationType>> messageDestinations
= module.getRootEarContext().getMessageDestinations();
 
         // Discover and process any @Resource annotations (if !metadata-complete)
@@ -128,6 +129,7 @@
         }
 
         List<ResourceEnvRefType> resourceEnvRefsUntyped = convert(specDD.selectChildren(adminOjbectRefQNameSet),
JEE_CONVERTER, ResourceEnvRefType.class, ResourceEnvRefType.type);
+        int unresolvedRefSize = resourceEnvRefsUntyped.size();
         ClassLoader cl = module.getEarContext().getClassLoader();
         for (ResourceEnvRefType resourceEnvRef : resourceEnvRefsUntyped) {
             String name = resourceEnvRef.getResourceEnvRefName().getStringValue().trim();
@@ -156,7 +158,7 @@
             }
         }
         
-        if (refMap.size() > 0) {
+        if ((initialGerRefSize - unresolvedRefSize) != refMap.size()) {
             log.warn("Failed to build reference to Admin object reference "+refMap.keySet()+"
defined in plan file, reason - corresponding entry in deployment descriptor missing.");
         }
         

Modified: geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java?rev=572902&r1=572901&r2=572902&view=diff
==============================================================================
--- geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
(original)
+++ geronimo/server/branches/2.0/modules/geronimo-connector-builder/src/main/java/org/apache/geronimo/connector/deployment/ResourceRefBuilder.java
Wed Sep  5 02:01:00 2007
@@ -116,7 +116,8 @@
         XmlObject[] gerResourceRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_RESOURCE_REF_QNAME_SET);
         Map refMap = mapResourceRefs(gerResourceRefsUntyped);
         ClassLoader cl = module.getEarContext().getClassLoader();
-
+        int initialGerRefSize = refMap.size();
+        int unresolvedRefSize = resourceRefsUntyped.size();
         for (ResourceRefType resourceRef : resourceRefsUntyped) {
             String name = resourceRef.getResRefName().getStringValue().trim();
             addInjections(name, resourceRef.getInjectionTargetArray(), componentContext);
@@ -204,7 +205,7 @@
             }
         }
 
-        if (refMap.size() > 0) {
+        if ((initialGerRefSize - unresolvedRefSize) != refMap.size()) {
             log.warn("Failed to build reference to resource reference "+refMap.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?rev=572902&r1=572901&r2=572902&view=diff
==============================================================================
--- 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 Sep  5 02:01:00 2007
@@ -113,6 +113,7 @@
     public void buildNaming(XmlObject specDD, XmlObject plan, Module module, Map componentContext)
throws DeploymentException {
         XmlObject[] gerResourceEnvRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_ADMIN_OBJECT_REF_QNAME_SET);
         Map<String, GerResourceEnvRefType> refMap = mapResourceEnvRefs(gerResourceEnvRefsUntyped);
+        int initialGerRefSize = refMap.size();
         Map<String, Map<String, GerMessageDestinationType>> messageDestinations
= module.getRootEarContext().getMessageDestinations();
 
         // Discover and process any @Resource annotations (if !metadata-complete)
@@ -128,6 +129,7 @@
         }
 
         List<ResourceEnvRefType> resourceEnvRefsUntyped = convert(specDD.selectChildren(adminOjbectRefQNameSet),
JEE_CONVERTER, ResourceEnvRefType.class, ResourceEnvRefType.type);
+        int unresolvedRefSize = resourceEnvRefsUntyped.size();
         ClassLoader cl = module.getEarContext().getClassLoader();
         for (ResourceEnvRefType resourceEnvRef : resourceEnvRefsUntyped) {
             String name = resourceEnvRef.getResourceEnvRefName().getStringValue().trim();
@@ -156,7 +158,7 @@
             }
         }
         
-        if (refMap.size() > 0) {
+        if ((initialGerRefSize - unresolvedRefSize) != refMap.size()) {
             log.warn("Failed to build reference to Admin object reference "+refMap.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/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?rev=572902&r1=572901&r2=572902&view=diff
==============================================================================
--- 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 Sep  5 02:01:00 2007
@@ -116,7 +116,8 @@
         XmlObject[] gerResourceRefsUntyped = plan == null ? NO_REFS : plan.selectChildren(GER_RESOURCE_REF_QNAME_SET);
         Map refMap = mapResourceRefs(gerResourceRefsUntyped);
         ClassLoader cl = module.getEarContext().getClassLoader();
-
+        int initialGerRefSize = refMap.size();
+        int unresolvedRefSize = resourceRefsUntyped.size();
         for (ResourceRefType resourceRef : resourceRefsUntyped) {
             String name = resourceRef.getResRefName().getStringValue().trim();
             addInjections(name, resourceRef.getInjectionTargetArray(), componentContext);
@@ -204,7 +205,7 @@
             }
         }
 
-        if (refMap.size() > 0) {
+        if ((initialGerRefSize - unresolvedRefSize) != refMap.size()) {
             log.warn("Failed to build reference to resource reference "+refMap.keySet()+"
defined in plan file, reason - corresponding entry in deployment descriptor missing.");
         }
     }



Mime
View raw message