geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r126472 - in geronimo/trunk/modules: connector-builder/src/java/org/apache/geronimo/connector/deployment deployment/src/java/org/apache/geronimo/deployment j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames jetty-builder/src/java/org/apache/geronimo/jetty/deployment kernel/src/java/org/apache/geronimo/kernel/registry naming-builder/src/java/org/apache/geronimo/naming/deployment security-builder/src/java/org/apache/geronimo/security/deployment service-builder/src/java/org/apache/geronimo/deployment/service
Date Wed, 26 Jan 2005 06:37:06 GMT
Author: djencks
Date: Tue Jan 25 22:37:04 2005
New Revision: 126472

URL: http://svn.apache.org/viewcvs?view=rev&rev=126472
Log:
keep the gbeans in a deployment context in a queriable container/registry.  Start using the query facility to resolve jndi references.  GERONIMO-552
Added:
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/GBeanDataRegistry.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/AbstractGBeanRegistry.java
Modified:
   geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
   geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
   geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java
   geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
   geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
   geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
   geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java
   geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
   geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
   geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java

Modified: geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java?view=diff&rev=126472&p1=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r1=126471&p2=geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java	(original)
+++ geronimo/trunk/modules/connector-builder/src/java/org/apache/geronimo/connector/deployment/ConnectorModuleBuilder.java	Tue Jan 25 22:37:04 2005
@@ -403,7 +403,7 @@
                 setDynamicGBeanDataAttributes(resourceAdapterInstanceGBeanData, geronimoResourceAdapter.getResourceadapterInstance().getConfigPropertySettingArray(), cl);
 
                 // set the work manager name
-                ObjectName workManagerName = ENCConfigBuilder.getGBeanId(NameFactory.JCA_WORK_MANAGER, geronimoResourceAdapter.getResourceadapterInstance().getWorkmanager(), moduleJ2eeContext, earContext.getGBeanNames(), kernel);
+                ObjectName workManagerName = ENCConfigBuilder.getGBeanId(NameFactory.JCA_WORK_MANAGER, geronimoResourceAdapter.getResourceadapterInstance().getWorkmanager(), moduleJ2eeContext, earContext, kernel);
                 resourceAdapterInstanceGBeanData.setReferencePattern("WorkManager", workManagerName);
 
                 String resourceAdapterName = geronimoResourceAdapter.getResourceadapterInstance().getResourceadapterName();

Modified: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java?view=diff&rev=126472&p1=geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java&r1=126471&p2=geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java	(original)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/DeploymentContext.java	Tue Jan 25 22:37:04 2005
@@ -25,40 +25,37 @@
 import java.io.InputStream;
 import java.io.ObjectOutputStream;
 import java.io.OutputStream;
+import java.net.MalformedURLException;
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.net.URL;
-import java.net.MalformedURLException;
 import java.net.URLClassLoader;
-import java.net.URISyntaxException;
+import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
+import java.util.LinkedList;
 import java.util.List;
-import java.util.Map;
 import java.util.Set;
-import java.util.ArrayList;
 import java.util.StringTokenizer;
-import java.util.LinkedList;
+import java.util.jar.Attributes;
 import java.util.jar.JarFile;
 import java.util.jar.Manifest;
-import java.util.jar.Attributes;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipFile;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 
+import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.gbean.jmx.GBeanMBean;
 import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.GBeanNotFoundException;
-import org.apache.geronimo.kernel.management.State;
-import org.apache.geronimo.kernel.repository.Repository;
+import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationManager;
 import org.apache.geronimo.kernel.config.ConfigurationModuleType;
-import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.kernel.management.State;
+import org.apache.geronimo.kernel.repository.Repository;
 
 /**
  * @version $Rev$ $Date$
@@ -71,7 +68,7 @@
     private final ConfigurationModuleType type;
     private final Kernel kernel;
     private final GBeanData config;
-    private final Map gbeans = new HashMap();
+    private final GBeanDataRegistry gbeans = new GBeanDataRegistry();
     private final Set dependencies = new LinkedHashSet();
     private final LinkedHashSet classPath = new LinkedHashSet();
     private final File baseDir;
@@ -116,6 +113,8 @@
             throw new AssertionError();
         }
 
+        gbeans.setDefaultDomain(domain);
+
         if (kernel != null && parentID != null) {
             ConfigurationManager configurationManager = kernel.getConfigurationManager();
             ObjectName parentName = Configuration.getConfigurationObjectName(parentID);
@@ -204,20 +203,17 @@
         return (String) config.getAttribute("server");
     }
 
-    /**
-     * @deprecated use addGBean(GBeanData gbean)
-     */
-    public void addGBean(ObjectName name, GBeanMBean gbean) {
-        gbeans.put(name, gbean);
-    }
-
     public void addGBean(GBeanData gbean) {
         assert gbean.getName() != null: "GBean name is null";
-        gbeans.put(gbean.getName(), gbean);
+        gbeans.register(gbean);
     }
 
     public Set getGBeanNames() {
-        return Collections.unmodifiableSet(gbeans.keySet());
+        return gbeans.getGBeanNames();
+    }
+
+    public Set listGBeans(ObjectName pattern) {
+        return gbeans.listGBeans(pattern);
     }
 
     public void addDependency(URI uri) {
@@ -490,18 +486,7 @@
         // persist all the GBeans in this Configuration
         // save the dependencies and classpath
         try {
-            GBeanData[] gbeanArray = new GBeanData[gbeans.size()];
-            Iterator iterator = gbeans.entrySet().iterator();
-            for (int i = 0; i < gbeanArray.length; i++) {
-                Map.Entry entry = (Map.Entry) iterator.next();
-                Object gbean = entry.getValue();
-                if (gbean instanceof GBeanMBean) {
-                    gbeanArray[i] = ((GBeanMBean) gbean).getGBeanData();
-                    gbeanArray[i].setName((ObjectName) entry.getKey());
-                } else {
-                    gbeanArray[i] = (GBeanData) gbean;
-                }
-            }
+            GBeanData[] gbeanArray = gbeans.getGBeans();
             config.setAttribute("gBeanState", Configuration.storeGBeans(gbeanArray));
             config.setReferencePatterns("Repositories", Collections.singleton(new ObjectName("*:name=Repository,*")));
             config.setAttribute("dependencies", new ArrayList(dependencies));

Added: geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/GBeanDataRegistry.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/GBeanDataRegistry.java?view=auto&rev=126472
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/deployment/src/java/org/apache/geronimo/deployment/GBeanDataRegistry.java	Tue Jan 25 22:37:04 2005
@@ -0,0 +1,64 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.deployment;
+
+import java.util.Set;
+import java.util.Collections;
+import javax.management.ObjectName;
+
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.registry.AbstractGBeanRegistry;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public class GBeanDataRegistry extends AbstractGBeanRegistry {
+
+    public void setDefaultDomain(String defaultDomain) {
+        this.defaultDomainName = defaultDomain;
+    }
+
+    public void preregister(ObjectName name) {
+        register(name, null);
+    }
+
+    public void register(GBeanData gbean) {
+        register(gbean.getName(), gbean);
+    }
+
+    public GBeanData getGBeanInstance(ObjectName name) throws GBeanNotFoundException {
+        GBeanData gbeanData;
+        synchronized (this) {
+            gbeanData = (GBeanData) registry.get(name);
+        }
+        if (gbeanData == null) {
+            throw new GBeanNotFoundException(name.getCanonicalName());
+        }
+        return gbeanData;
+    }
+
+    public Set getGBeanNames() {
+        return Collections.unmodifiableSet(registry.keySet());
+    }
+
+    public GBeanData[] getGBeans() {
+        return (GBeanData[])registry.values().toArray(new GBeanData[registry.size()]);
+    }
+
+
+}

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?view=diff&rev=126472&p1=geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java&r1=126471&p2=geronimo/trunk/modules/j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/RefContext.java&r2=126472
==============================================================================
--- 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	Tue Jan 25 22:37:04 2005
@@ -21,6 +21,7 @@
 import java.util.HashMap;
 import java.util.Map;
 import java.util.List;
+import java.util.Set;
 
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
@@ -249,12 +250,25 @@
         }
     }
 
-    public String getConnectionFactoryContainerId(URI module, String resourceLink, String type, J2eeContext j2eeContext) throws DeploymentException, UnknownEJBRefException {
+    public String getConnectionFactoryContainerId(URI module, String resourceLink, String type, J2eeContext j2eeContext, DeploymentContext context) throws DeploymentException, UnknownEJBRefException {
         String name = resourceLink.substring(resourceLink.lastIndexOf('#') + 1);
         try {
             return getContainerId(module, resourceLink, (Map) connectionFactoryIndex.get(name));
         } catch (UnknownEJBRefException e) {
+
             ObjectName query = null;
+            try {
+                query = NameFactory.getComponentNameQuery(null, null, null, name, type, j2eeContext);
+            } catch (MalformedObjectNameException e1) {
+                throw new DeploymentException("Could not construct connection factory object name query", e);
+            }
+            Set matches = context.listGBeans(query);
+            if (matches.size() > 1) {
+                throw new DeploymentException("More than one match for query " + matches);
+            }
+            if (matches.size() == 1) {
+                return ((ObjectName)matches.iterator().next()).getCanonicalName();
+            }
             try {
                 query = NameFactory.getComponentRestrictedQueryName(null, null, name, type, j2eeContext);
             } catch (MalformedObjectNameException e1) {

Modified: geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java?view=diff&rev=126472&p1=geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java&r1=126471&p2=geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java	(original)
+++ geronimo/trunk/modules/j2ee-builder/src/test/org/apache/geronimo/j2ee/deployment/EARConfigBuilderTest.java	Tue Jan 25 22:37:04 2005
@@ -17,16 +17,16 @@
 
 package org.apache.geronimo.j2ee.deployment;
 
+import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.IOException;
-import java.io.ByteArrayOutputStream;
 import java.io.ObjectOutputStream;
 import java.net.URI;
 import java.net.URL;
-import java.util.jar.JarFile;
 import java.util.List;
-import javax.management.ObjectName;
+import java.util.jar.JarFile;
 import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
 
 import junit.extensions.TestSetup;
 import junit.framework.Test;
@@ -34,18 +34,17 @@
 import junit.framework.TestSuite;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.deployment.util.DeploymentUtil;
-import org.apache.geronimo.kernel.jmx.JMXUtil;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.GBeanInfo;
+import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
+import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.config.ConfigurationStore;
 import org.apache.geronimo.kernel.config.InvalidConfigException;
 import org.apache.geronimo.kernel.config.NoSuchConfigException;
-import org.apache.geronimo.kernel.config.Configuration;
-import org.apache.geronimo.kernel.registry.GBeanRegistry;
+import org.apache.geronimo.kernel.jmx.JMXUtil;
 import org.apache.geronimo.kernel.registry.BasicGBeanRegistry;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.GBeanInfoBuilder;
-import org.apache.geronimo.gbean.GBeanInfo;
-import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 
 /**
  * @version $Rev$ $Date$
@@ -62,7 +61,6 @@
     private static ServiceReferenceBuilder serviceReferenceBuilder = null;
 
     private static final String j2eeServerName = "someDomain";
-    private static final ObjectName j2eeServer = JMXUtil.getObjectName(j2eeServerName + ":j2eeType=J2EEServer,name=J2EEServerName");
     private static final ObjectName transactionManagerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=TransactionManager");
     private static final ObjectName connectionTrackerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ConnectionTracker");
     private static final ObjectName transactionalTimerObjectName = JMXUtil.getObjectName(j2eeServerName + ":type=ThreadPooledTimer,name=TransactionalThreaPooledTimer");

Modified: geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java?view=diff&rev=126472&p1=geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java&r1=126471&p2=geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java	(original)
+++ geronimo/trunk/modules/j2ee/src/java/org/apache/geronimo/j2ee/j2eeobjectnames/NameFactory.java	Tue Jan 25 22:37:04 2005
@@ -166,25 +166,18 @@
      */
 
     public static ObjectName getComponentRestrictedQueryName(String j2eeDomainName, String j2eeServerName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {
-//        Properties props = new Properties();
-//        props.put(J2EE_TYPE, context.getJ2eeType(j2eeType));
-//        props.put(J2EE_SERVER, context.getJ2eeServerName(j2eeServerName));
-//        props.put(J2EE_APPLICATION, NULL;
-//        props.put(RESOURCE_ADAPTER_MODULE, context.getJ2eeModuleName(j2eeModuleName));
-//        props.put(JCA_RESOURCE, context.getJ2eeModuleName(j2eeModuleName));
-//        props.put(J2EE_NAME, context.getJ2eeName(j2eeName));
-//        try {
-//            return ObjectName.getInstance(context.getJ2eeDomainName(j2eeDomainName), props);
-//        } catch (MalformedObjectNameException e) {
-//            throw new DeploymentException("Invalid component name", e);
-//        }
+        String applicationName = NULL;
+        return getComponentNameQuery(j2eeDomainName, j2eeServerName, applicationName, j2eeName, j2eeType, context);
+    }
+
+    public static ObjectName getComponentNameQuery(String j2eeDomainName, String j2eeServerName, String applicationName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {
         StringBuffer buffer = new StringBuffer(context.getJ2eeDomainName(j2eeDomainName))
                 .append(":" + J2EE_TYPE + "=").append(context.getJ2eeType(j2eeType))
                 .append("," + J2EE_SERVER + "=").append(context.getJ2eeServerName(j2eeServerName))
-                .append("," + J2EE_APPLICATION + "=" + NULL)
+                .append("," + J2EE_APPLICATION + "=").append(context.getJ2eeApplicationName(applicationName))
                 .append("," + J2EE_NAME + "=").append(context.getJ2eeName(j2eeName))
                 .append(",*");
-        return new ObjectName(buffer.toString());
+        return ObjectName.getInstance(buffer.toString());
     }
 
     public static ObjectName getWebComponentName(String j2eeDomainName, String j2eeServerName, String j2eeApplicationName, String j2eeModuleName, String j2eeName, String j2eeType, J2eeContext context) throws MalformedObjectNameException {

Modified: geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?view=diff&rev=126472&p1=geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r1=126471&p2=geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java	(original)
+++ geronimo/trunk/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java	Tue Jan 25 22:37:04 2005
@@ -73,7 +73,6 @@
 import org.apache.geronimo.schema.SchemaConversionUtils;
 import org.apache.geronimo.security.deploy.Security;
 import org.apache.geronimo.security.deployment.SecurityBuilder;
-import org.apache.geronimo.security.realm.GenericSecurityRealm;
 import org.apache.geronimo.security.util.URLPattern;
 import org.apache.geronimo.transaction.OnlineUserTransaction;
 import org.apache.geronimo.xbeans.geronimo.jetty.JettyWebAppDocument;
@@ -348,17 +347,9 @@
             contextPriorityClassLoader = Boolean.valueOf(jettyWebApp.getContextPriorityClassloader()).booleanValue();
         }
         ClassLoader webClassLoader = new JettyClassLoader(webClassPathURLs, cl, contextPriorityClassLoader);
-        Map localSecurityRealms = new HashMap();
         if (jettyWebApp != null) {
             GbeanType[] gbeans = jettyWebApp.getGbeanArray();
-            Set added = ServiceConfigBuilder.addGBeans(gbeans, cl, moduleJ2eeContext, earContext);
-            for (Iterator iterator = added.iterator(); iterator.hasNext();) {
-                GBeanData gBeanData = (GBeanData) iterator.next();
-                String className = gBeanData.getGBeanInfo().getClassName();
-                if (GenericSecurityRealm.class.getName().equals(className)) {
-                    localSecurityRealms.put(gBeanData.getAttribute("realmName"), gBeanData);
-                }
-            }
+            ServiceConfigBuilder.addGBeans(gbeans, cl, moduleJ2eeContext, earContext);
         }
 
         ObjectName webModuleName = null;
@@ -377,7 +368,7 @@
             Set securityRoles = collectRoleNames(webApp);
             if (jettyWebApp.isSetSecurityRealmName()) {
                 String securityRealmName = jettyWebApp.getSecurityRealmName().trim();
-                Security security = SecurityBuilder.buildSecurityConfig(Collections.singleton(securityRealmName), jettyWebApp.getSecurity(), securityRoles, localSecurityRealms, kernel);
+                Security security = SecurityBuilder.buildSecurityConfig(jettyWebApp.getSecurity(), securityRoles);
                 webModuleData.setAttribute("securityRealmName", securityRealmName);
                 webModuleData.setAttribute("securityConfig", security);
 

Added: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/AbstractGBeanRegistry.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/AbstractGBeanRegistry.java?view=auto&rev=126472
==============================================================================
--- (empty file)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/AbstractGBeanRegistry.java	Tue Jan 25 22:37:04 2005
@@ -0,0 +1,212 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.kernel.registry;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Collections;
+import java.util.regex.Pattern;
+import javax.management.ObjectName;
+
+import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.InternalKernelException;
+import org.apache.geronimo.kernel.Kernel;
+
+/**
+ * @version $Rev:  $ $Date:  $
+ */
+public class AbstractGBeanRegistry {
+    protected final Map registry = new HashMap();
+    protected final Map domainIndex = new HashMap();
+    protected String defaultDomainName;
+
+    public void stop() {
+        // todo destroy instances
+        synchronized (this) {
+            registry.clear();
+            domainIndex.clear();
+        }
+    }
+
+    public boolean isRegistered(ObjectName name) {
+        synchronized (this) {
+            return registry.containsKey(name);
+        }
+    }
+
+    protected void register(ObjectName name, Object gbean) {
+        // do as much work as possible outside of the synchronized block
+        String domainName = name.getDomain();
+        // convert properties list to a HashMap as it is more efficient then the synchronized Hashtable
+        Map properties = new HashMap(name.getKeyPropertyList());
+
+        synchronized (this) {
+            registry.put(name, gbean);
+
+            Map nameToProperties = (Map) domainIndex.get(domainName);
+            if (nameToProperties == null) {
+                nameToProperties = new HashMap();
+                domainIndex.put(domainName, nameToProperties);
+            }
+            nameToProperties.put(name, properties);
+        }
+    }
+
+    public void unregister(ObjectName name) throws GBeanNotFoundException, InternalKernelException {
+        String domainName = name.getDomain();
+        synchronized (this) {
+            registry.remove(name);
+
+            // just leave the an empty nameToProperty map
+            Map nameToProperties = (Map) domainIndex.get(domainName);
+            if (nameToProperties != null) {
+                nameToProperties.remove(name);
+            }
+        }
+    }
+
+    public Set listGBeans(ObjectName pattern) throws InternalKernelException {
+        if (pattern == null) {
+            synchronized (this) {
+                return new HashSet(registry.keySet());
+            }
+        }
+
+        String patternDomain = pattern.getDomain();
+        if (patternDomain.length() == 0) {
+            patternDomain = defaultDomainName;
+        }
+
+        // work with a copy of the registry key set
+        List nameToProperties;
+        if (!pattern.isDomainPattern()) {
+            synchronized (this) {
+                // create an array list big enough to match all names... extra space is better than resizing
+                nameToProperties = new ArrayList(registry.size());
+
+                // find we are only matching one specific domain, so
+                // just grab it directly from the index
+                Map map = (Map) domainIndex.get(patternDomain);
+                if (map != null) {
+                    nameToProperties.addAll(map.entrySet());
+                }
+            }
+        } else if (patternDomain.equals("*")) {
+            // this is very commmon, so support it directly
+            synchronized (this) {
+                // create an array list big enough to match all names... extra space is better than resizing
+                nameToProperties = new ArrayList(registry.size());
+
+                // find we are matching all domain, so just grab all of them directly
+                for (Iterator iterator = domainIndex.values().iterator(); iterator.hasNext();) {
+                    Map map = (Map) iterator.next();
+
+                    // we can just copy the entry set directly into the list we don't
+                    // have to worry about duplicates as the maps are mutually exclusive
+                    nameToProperties.addAll(map.entrySet());
+                }
+            }
+        } else {
+            String perl5Pattern = domainPatternToPerl5(patternDomain);
+            Pattern domainPattern = Pattern.compile(perl5Pattern);
+
+            synchronized (this) {
+                // create an array list big enough to match all names... extra space is better than resizing
+                nameToProperties = new ArrayList(registry.size());
+
+                // find all of the matching domains
+                for (Iterator iterator = domainIndex.entrySet().iterator(); iterator.hasNext();) {
+                    Map.Entry entry = (Map.Entry) iterator.next();
+                    String domain = (String) entry.getKey();
+                    if (domainPattern.matcher(domain).matches()) {
+                        // we can just copy the entry set directly into the list we don't
+                        // have to worry about duplicates as the maps are mutually exclusive
+                        Map map = (Map) entry.getValue();
+                        nameToProperties.addAll(map.entrySet());
+                    }
+                }
+            }
+        }
+
+        if (nameToProperties.isEmpty()) {
+            return Collections.EMPTY_SET;
+        }
+
+        // convert the pattern property list to a HashMap as it is not synchronized
+        Map patternProperties = new HashMap(pattern.getKeyPropertyList());
+        patternProperties.remove("*");
+        boolean isMatchAll = patternProperties.isEmpty();
+        boolean isPropertyPattern = pattern.isPropertyPattern();
+
+        Set matchingNames = new HashSet();
+        for (Iterator iterator = nameToProperties.iterator(); iterator.hasNext();) {
+            Map.Entry entry = (Map.Entry) iterator.next();
+            Map properties = (Map) entry.getValue();
+
+            if (isMatchAll) {
+                matchingNames.add(entry.getKey());
+            } else if (isPropertyPattern) {
+                if (properties.entrySet().containsAll(patternProperties.entrySet())) {
+                    matchingNames.add(entry.getKey());
+                }
+
+            } else {
+                if (properties.entrySet().equals(patternProperties.entrySet())) {
+                    matchingNames.add(entry.getKey());
+                }
+            }
+        }
+        return matchingNames;
+    }
+
+    private static String domainPatternToPerl5(String pattern) {
+        char[] patternCharacters = pattern.toCharArray();
+        StringBuffer buffer = new StringBuffer(2 * patternCharacters.length);
+        for (int position = 0; position < patternCharacters.length; position++) {
+            char character = patternCharacters[position];
+            switch (character) {
+                case '*':
+                    // replace '*' with '.*'
+                    buffer.append(".*");
+                    break;
+                case '?':
+                    // replace '?' with '.'
+                    buffer.append('.');
+                    break;
+                default:
+                    // escape any perl5 characters with '\'
+                    if (isPerl5MetaCharacter(character)) {
+                        buffer.append('\\');
+                    }
+                    buffer.append(character);
+                    break;
+            }
+        }
+
+        return buffer.toString();
+    }
+
+    private static boolean isPerl5MetaCharacter(char character) {
+        return ("'*?+[]()|^$.{}\\".indexOf(character) >= 0);
+    }
+
+}

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java?view=diff&rev=126472&p1=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java&r1=126471&p2=geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java	(original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/kernel/registry/BasicGBeanRegistry.java	Tue Jan 25 22:37:04 2005
@@ -36,59 +36,16 @@
 /**
  * @version $Rev$ $Date$
  */
-public class BasicGBeanRegistry implements GBeanRegistry {
-    private final Map registry = new HashMap();
-    private final Map domainIndex = new HashMap();
-    private String defaultDomainName;
+public class BasicGBeanRegistry extends AbstractGBeanRegistry implements GBeanRegistry {
 
     public void start(Kernel kernel) {
         this.defaultDomainName = kernel.getKernelName();
     }
 
-    public void stop() {
-        // todo destroy instances
-        synchronized (this) {
-            registry.clear();
-            domainIndex.clear();
-        }
-    }
-
-    public boolean isRegistered(ObjectName name) {
-        synchronized (this) {
-            return registry.containsKey(name);
-        }
-    }
-
     public void register(GBeanInstance gbeanInstance) throws GBeanAlreadyExistsException, InternalKernelException {
-        // do as much work as possible outside of the synchronized block
         ObjectName name = gbeanInstance.getObjectNameObject();
-        String domainName = name.getDomain();
-        // convert properties list to a HashMap as it is more efficient then the synchronized Hashtable
-        Map properties = new HashMap(name.getKeyPropertyList());
-
-        synchronized (this) {
-            registry.put(name, gbeanInstance);
+        register(name, gbeanInstance);
 
-            Map nameToProperties = (Map) domainIndex.get(domainName);
-            if (nameToProperties == null) {
-                nameToProperties = new HashMap();
-                domainIndex.put(domainName, nameToProperties);
-            }
-            nameToProperties.put(name, properties);
-        }
-    }
-
-    public void unregister(ObjectName name) throws GBeanNotFoundException, InternalKernelException {
-        String domainName = name.getDomain();
-        synchronized (this) {
-            registry.remove(name);
-
-            // just leave the an empty nameToProperty map
-            Map nameToProperties = (Map) domainIndex.get(domainName);
-            if (nameToProperties != null) {
-                nameToProperties.remove(name);
-            }
-        }
     }
 
     public GBeanInstance getGBeanInstance(ObjectName name) throws GBeanNotFoundException {
@@ -102,128 +59,4 @@
         return gbeanInstance;
     }
 
-    public Set listGBeans(ObjectName pattern) throws InternalKernelException {
-        if (pattern == null) {
-            synchronized (this) {
-                return new HashSet(registry.keySet());
-            }
-        }
-
-        String patternDomain = pattern.getDomain();
-        if (patternDomain.length() == 0) {
-            patternDomain = defaultDomainName;
-        }
-
-        // work with a copy of the registry key set
-        List nameToProperties;
-        if (!pattern.isDomainPattern()) {
-            synchronized (this) {
-                // create an array list big enough to match all names... extra space is better than resizing
-                nameToProperties = new ArrayList(registry.size());
-
-                // find we are only matching one specific domain, so
-                // just grab it directly from the index
-                Map map = (Map) domainIndex.get(patternDomain);
-                if (map != null) {
-                    nameToProperties.addAll(map.entrySet());
-                }
-            }
-        } else if (patternDomain.equals("*")) {
-            // this is very commmon, so support it directly
-            synchronized (this) {
-                // create an array list big enough to match all names... extra space is better than resizing
-                nameToProperties = new ArrayList(registry.size());
-
-                // find we are matching all domain, so just grab all of them directly
-                for (Iterator iterator = domainIndex.values().iterator(); iterator.hasNext();) {
-                    Map map = (Map) iterator.next();
-
-                    // we can just copy the entry set directly into the list we don't
-                    // have to worry about duplicates as the maps are mutually exclusive
-                    nameToProperties.addAll(map.entrySet());
-                }
-            }
-        } else {
-            String perl5Pattern = domainPatternToPerl5(patternDomain);
-            Pattern domainPattern = Pattern.compile(perl5Pattern);
-
-            synchronized (this) {
-                // create an array list big enough to match all names... extra space is better than resizing
-                nameToProperties = new ArrayList(registry.size());
-
-                // find all of the matching domains
-                for (Iterator iterator = domainIndex.entrySet().iterator(); iterator.hasNext();) {
-                    Map.Entry entry = (Map.Entry) iterator.next();
-                    String domain = (String) entry.getKey();
-                    if (domainPattern.matcher(domain).matches()) {
-                        // we can just copy the entry set directly into the list we don't
-                        // have to worry about duplicates as the maps are mutually exclusive
-                        Map map = (Map) entry.getValue();
-                        nameToProperties.addAll(map.entrySet());
-                    }
-                }
-            }
-        }
-
-        if (nameToProperties.isEmpty()) {
-            return Collections.EMPTY_SET;
-        }
-
-        // convert the pattern property list to a HashMap as it is not synchronized
-        Map patternProperties = new HashMap(pattern.getKeyPropertyList());
-        patternProperties.remove("*");
-        boolean isMatchAll = patternProperties.isEmpty();
-        boolean isPropertyPattern = pattern.isPropertyPattern();
-
-        Set matchingNames = new HashSet();
-        for (Iterator iterator = nameToProperties.iterator(); iterator.hasNext();) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            Map properties = (Map) entry.getValue();
-
-            if (isMatchAll) {
-                matchingNames.add(entry.getKey());
-            } else if (isPropertyPattern) {
-                if (properties.entrySet().containsAll(patternProperties.entrySet())) {
-                    matchingNames.add(entry.getKey());
-                }
-
-            } else {
-                if (properties.entrySet().equals(patternProperties.entrySet())) {
-                    matchingNames.add(entry.getKey());
-                }
-            }
-        }
-        return matchingNames;
-    }
-
-    private static String domainPatternToPerl5(String pattern) {
-        char[] patternCharacters = pattern.toCharArray();
-        StringBuffer buffer = new StringBuffer(2 * patternCharacters.length);
-        for (int position = 0; position < patternCharacters.length; position++) {
-            char character = patternCharacters[position];
-            switch (character) {
-                case '*':
-                    // replace '*' with '.*'
-                    buffer.append(".*");
-                    break;
-                case '?':
-                    // replace '?' with '.'
-                    buffer.append('.');
-                    break;
-                default:
-                    // escape any perl5 characters with '\'
-                    if (isPerl5MetaCharacter(character)) {
-                        buffer.append('\\');
-                    }
-                    buffer.append(character);
-                    break;
-            }
-        }
-
-        return buffer.toString();
-    }
-
-    private static boolean isPerl5MetaCharacter(char character) {
-        return ("'*?+[]()|^$.{}\\".indexOf(character) >= 0);
-    }
 }

Modified: geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?view=diff&rev=126472&p1=geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java&r1=126471&p2=geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java	(original)
+++ geronimo/trunk/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java	Tue Jan 25 22:37:04 2005
@@ -25,7 +25,6 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -37,9 +36,10 @@
 import javax.xml.namespace.QName;
 
 import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.j2ee.deployment.EARContext;
-import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
@@ -65,7 +65,8 @@
  * @version $Rev$ $Date$
  */
 public class ENCConfigBuilder {
-    public static ObjectName getGBeanId(String j2eeType, GerGbeanLocatorType gerGbeanLocator, J2eeContext j2eeContext, Set localGBeans, Kernel kernel) throws DeploymentException {
+
+    public static ObjectName getGBeanId(String j2eeType, GerGbeanLocatorType gerGbeanLocator, J2eeContext j2eeContext, DeploymentContext context, Kernel kernel) throws DeploymentException {
         ObjectName containerId = null;
         if (gerGbeanLocator.isSetGbeanLink()) {
             //exact match
@@ -76,23 +77,23 @@
             } catch (MalformedObjectNameException e) {
                 throw new DeploymentException("Could not construct gbean name", e);
             }
-            if (localGBeans.contains(exact)) {
+            if (context.listGBeans(exact).size() == 1) {
                 containerId = exact;
             } else {
-                Map keys = new HashMap();
-                keys.put(NameFactory.J2EE_TYPE, j2eeType);
-                keys.put(NameFactory.J2EE_NAME, linkName);
-                for (Iterator iterator = localGBeans.iterator(); iterator.hasNext();) {
-                    ObjectName objectName = (ObjectName) iterator.next();
-                    if (objectName.getKeyPropertyList().entrySet().containsAll(keys.entrySet())) {
-                        if (containerId != null) {
-                            throw new DeploymentException("two matches for gbean link!" + objectName);
-                        }
-                        containerId = objectName;
-                    }
+                ObjectName query = null;
+                try {
+                    query = NameFactory.getComponentNameQuery(null, null, null, linkName, j2eeType, j2eeContext);
+                } catch(MalformedObjectNameException e) {
+                    throw new DeploymentException("Could not construct query for gbean name", e);
+                }
+                Set localMatches = context.listGBeans(query);
+                if (localMatches.size() > 1) {
+                    throw new DeploymentException("More than one local match for gbean link, " + localMatches);
+                }
+                if (localMatches.size() == 1) {
+                    containerId = (ObjectName) localMatches.iterator().next();
                 }
                 if (containerId == null) {
-                    ObjectName query = null;
                     try {
                         query = NameFactory.getComponentRestrictedQueryName(null, null, linkName, j2eeType, j2eeContext);
                     } catch (MalformedObjectNameException e) {
@@ -185,7 +186,7 @@
                 } else {
                     j2eeType = NameFactory.JCA_MANAGED_CONNECTION_FACTORY;
                 }
-                String containerId = getResourceContainerId(name, j2eeType, uri, gerResourceRef, refContext, j2eeContext);
+                String containerId = getResourceContainerId(name, j2eeType, uri, gerResourceRef, refContext, j2eeContext, earContext);
 
                 ref = refContext.getConnectionFactoryRef(containerId, iface);
                 try {
@@ -198,16 +199,16 @@
 
     }
 
-    private static String getResourceContainerId(String name, String type, URI uri, GerResourceRefType gerResourceRef, RefContext refContext, J2eeContext j2eeContext) throws DeploymentException {
+    private static String getResourceContainerId(String name, String type, URI uri, GerResourceRefType gerResourceRef, RefContext refContext, J2eeContext j2eeContext, DeploymentContext context) throws DeploymentException {
         String containerId = null;
         if (gerResourceRef == null) {
             //try to resolve ref based only matching resource-ref-name
             //throws exception if it can't locate ref.
-            containerId = refContext.getConnectionFactoryContainerId(uri, name, type, j2eeContext);
+            containerId = refContext.getConnectionFactoryContainerId(uri, name, type, j2eeContext, context);
         } else if (gerResourceRef.isSetResourceLink()) {
-            containerId = refContext.getConnectionFactoryContainerId(uri, getStringValue(gerResourceRef.getResourceLink()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, j2eeContext);
+            containerId = refContext.getConnectionFactoryContainerId(uri, gerResourceRef.getResourceLink().trim(), type, j2eeContext, context);
         } else if (gerResourceRef.isSetTargetName()) {
-            containerId = getStringValue(gerResourceRef.getTargetName());
+            containerId =  gerResourceRef.getTargetName().trim();
         } else {
             //construct name from components
             try {
@@ -216,7 +217,6 @@
                         getStringValue(gerResourceRef.getApplication()),
                         getStringValue(gerResourceRef.getModule()),
                         getStringValue(gerResourceRef.getName()),
-                        //todo determine type from iface class
                         gerResourceRef.getType() == null ? type : gerResourceRef.getType().trim(),
                         j2eeContext);
             } catch (MalformedObjectNameException e) {
@@ -556,7 +556,7 @@
             if (!URL.class.getName().equals(type)
                     && !"javax.mail.Session".equals(type)) {
                 GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(resourceRefType.getResRefName().getStringValue());
-                String containerId = getResourceContainerId(getStringValue(resourceRefType.getResRefName()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, uri, gerResourceRef, refContext, j2eeContext);
+                String containerId = getResourceContainerId(getStringValue(resourceRefType.getResRefName()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, uri, gerResourceRef, refContext, j2eeContext, earContext);
                 if ("Unshareable".equals(getStringValue(resourceRefType.getResSharingScope()))) {
                     unshareableResources.add(containerId);
                 }

Modified: geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java?view=diff&rev=126472&p1=geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java&r1=126471&p2=geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java	(original)
+++ geronimo/trunk/modules/security-builder/src/java/org/apache/geronimo/security/deployment/SecurityBuilder.java	Tue Jan 25 22:37:04 2005
@@ -17,11 +17,9 @@
 package org.apache.geronimo.security.deployment;
 
 import java.util.HashSet;
-import java.util.Map;
 import java.util.Set;
 
 import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.security.deploy.DefaultPrincipal;
 import org.apache.geronimo.security.deploy.Principal;
 import org.apache.geronimo.security.deploy.Realm;
@@ -40,7 +38,7 @@
  */
 public class SecurityBuilder {
 
-    public static Security buildSecurityConfig(Set loginDomainNames, GerSecurityType securityType, Set roleNames, Map localSecurityRealms, Kernel kernel) throws DeploymentException {
+    public static Security buildSecurityConfig(GerSecurityType securityType, Set roleNames) throws DeploymentException {
         Security security = null;
 
         if (securityType == null) {

Modified: geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Url: http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?view=diff&rev=126472&p1=geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&r1=126471&p2=geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java&r2=126472
==============================================================================
--- geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java	(original)
+++ geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java	Tue Jan 25 22:37:04 2005
@@ -206,15 +206,13 @@
         }
     }
 
-    //TODO returning set of added gbeans is a HACK used only by stuff needing to access security gbeans at deploy time!  REMOVE IT!!
-    public static Set addGBeans(GbeanType[] gbeans, ClassLoader cl, J2eeContext j2eeContext, DeploymentContext context) throws DeploymentException {
+    public static void addGBeans(GbeanType[] gbeans, ClassLoader cl, J2eeContext j2eeContext, DeploymentContext context) throws DeploymentException {
         Set result = new HashSet();
         for (int i = 0; i < gbeans.length; i++) {
             GBeanData gBeanData = getGBeanData(gbeans[i], j2eeContext, cl);
             context.addGBean(gBeanData);
             result.add(gBeanData);
         }
-        return result;
     }
 
     public static GBeanData getGBeanData(GbeanType gbean, J2eeContext j2eeContext, ClassLoader cl) throws DeploymentException {

Mime
View raw message