geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r405869 - in /geronimo/branches/1.1/modules: common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Date Fri, 12 May 2006 20:51:34 GMT
Author: djencks
Date: Fri May 12 13:51:32 2006
New Revision: 405869

URL: http://svn.apache.org/viewcvs?rev=405869&view=rev
Log:
GERONIMO-2016 improve UnresolvedReferenceException message

Modified:
    geronimo/branches/1.1/modules/common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java
    geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java

Modified: geronimo/branches/1.1/modules/common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java?rev=405869&r1=405868&r2=405869&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java
(original)
+++ geronimo/branches/1.1/modules/common/src/java/org/apache/geronimo/common/UnresolvedReferenceException.java
Fri May 12 13:51:32 2006
@@ -25,11 +25,13 @@
     private String resourceType;
     private boolean multiple;
     private String nameQuery;
+    private final String moduleName;
 
-    public UnresolvedReferenceException(String resourceType, boolean multiple, String nameQuery)
{
+    public UnresolvedReferenceException(String resourceType, boolean multiple, String nameQuery,
String moduleName) {
         this.resourceType = resourceType;
         this.multiple = multiple;
         this.nameQuery = nameQuery;
+        this.moduleName = moduleName;
     }
 
     public String getResourceType() {
@@ -44,7 +46,11 @@
         return nameQuery;
     }
 
+    public String getModuleName() {
+        return moduleName;
+    }
+
     public String getMessage() {
-        return (multiple ? "Ambiguous " : "Unknown ") + resourceType + " reference (query="
+ nameQuery + ")";
+        return (multiple ? "Ambiguous " : "Unknown ") + resourceType + " reference (query="
+ nameQuery + ") from module: " + moduleName;
     }
 }

Modified: geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?rev=405869&r1=405868&r2=405869&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Fri May 12 13:51:32 2006
@@ -781,7 +781,7 @@
         try {
             configuration.findGBean(containerId);
         } catch (GBeanNotFoundException e) {
-            throw new UnresolvedReferenceException("Resource", false, containerId.toString());
+            throw new UnresolvedReferenceException("Resource", false, containerId.toString(),
configuration.getId().toString());
         }
         return new ResourceReference(configuration.getId(), containerId, iface);
     }



Mime
View raw message