geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r190795 - /geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
Date Wed, 15 Jun 2005 19:45:59 GMT
Author: djencks
Date: Wed Jun 15 12:45:57 2005
New Revision: 190795

URL: http://svn.apache.org/viewcvs?rev=190795&view=rev
Log:
Once we've found the correct answer, stop looking

Modified:
    geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java

Modified: geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java?rev=190795&r1=190794&r2=190795&view=diff
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
(original)
+++ geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
Wed Jun 15 12:45:57 2005
@@ -274,7 +274,6 @@
 
     public ObjectName locateComponent(String name, String type, J2eeContext j2eeContext,
DeploymentContext context, String queryType) throws DeploymentException {
         ObjectName query = null;
-        ObjectName containerName;
         try {
             query = NameFactory.getComponentNameQuery(null, null, null, name, type, j2eeContext);
         } catch (MalformedObjectNameException e1) {
@@ -285,15 +284,15 @@
             throw new DeploymentException("More than one match for query " + matches);
         }
         if (matches.size() == 1) {
-            containerName = (ObjectName) matches.iterator().next();
+            return (ObjectName) matches.iterator().next();
         }
+        //no matches in current context, look in other modules with J2EEApplication=null
         try {
             query = NameFactory.getComponentRestrictedQueryName(null, null, name, type, j2eeContext);
         } catch (MalformedObjectNameException e1) {
             throw new DeploymentException("Could not construct " + queryType + " object name
query", e1);
         }
-        containerName = locateUniqueName(query, queryType);
-        return containerName;
+        return locateUniqueName(query, queryType);
     }
 
     public Reference getAdminObjectRef(String containerId, Class iface) throws DeploymentException
{



Mime
View raw message