geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r384933 [2/2] - in /geronimo/branches/1.1/modules: connector-builder/src/test/org/apache/geronimo/connector/deployment/ deployment/src/java/org/apache/geronimo/deployment/ j2ee-builder/src/java/org/apache/geronimo/j2ee/deployment/ j2ee-buil...
Date Fri, 10 Mar 2006 22:06:01 GMT
Modified: geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/test/org/apache/geronimo/jetty/deployment/JettyModuleBuilderTest.java
Fri Mar 10 14:05:58 2006
@@ -23,7 +23,6 @@
 import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URL;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
@@ -44,6 +43,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.Module;
@@ -178,7 +178,7 @@
                         return null;
                     }
 
-                    public Reference createCORBAReference(URI corbaURL, String objectName,
ObjectName containerName, String home) throws DeploymentException {
+                    public Reference createCORBAReference(URI corbaURL, String objectName,
AbstractName containerName, String home) throws DeploymentException {
                         return null;
                     }
 

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractName.java
Fri Mar 10 14:05:58 2006
@@ -46,7 +46,7 @@
     public AbstractName(Artifact artifact, Map name, Set interfaceTypes, ObjectName objectName)
{
         assert artifact != null;
         assert name != null;
-        assert interfaceTypes != null;
+        if (interfaceTypes == null) interfaceTypes = Collections.EMPTY_SET;
         assert objectName != null;
         this.artifact = artifact;
         this.name = name;

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/gbean/AbstractNameQuery.java
Fri Mar 10 14:05:58 2006
@@ -17,19 +17,19 @@
 
 package org.apache.geronimo.gbean;
 
-import org.apache.geronimo.kernel.repository.Artifact;
-
 import java.io.Serializable;
-import java.util.Map;
+import java.util.Collections;
 import java.util.Iterator;
-import java.util.List;
+import java.util.Map;
 import java.util.Set;
-import java.util.Collections;
+
+import org.apache.geronimo.kernel.repository.Artifact;
 
 /**
  * @version $Rev:$ $Date:$
  */
 public class AbstractNameQuery implements Serializable {
+    private static final long serialVersionUID = 7444620122607155678L;
 
     private final Artifact artifact;
     private final Map name;
@@ -44,7 +44,11 @@
     public AbstractNameQuery(Artifact artifact, Map name, String interfaceType) {
         this.artifact = artifact;
         this.name = name;
-        this.interfaceTypes = Collections.singleton(interfaceType);
+        if (interfaceType != null) {
+            this.interfaceTypes = Collections.singleton(interfaceType);
+        } else {
+            this.interfaceTypes = Collections.EMPTY_SET;
+        }
     }
 
     public AbstractNameQuery(String interfaceType) {
@@ -56,6 +60,7 @@
     public AbstractNameQuery(Artifact artifact, Map name, Set interfaceTypes) {
         this.artifact = artifact;
         this.name = name;
+        if (interfaceTypes == null) interfaceTypes = Collections.EMPTY_SET;
         this.interfaceTypes = interfaceTypes;
     }
 

Modified: geronimo/branches/1.1/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
(original)
+++ geronimo/branches/1.1/modules/naming-builder/src/test/org/apache/geronimo/naming/deployment/MessageDestinationTest.java
Fri Mar 10 14:05:58 2006
@@ -62,7 +62,7 @@
                 return null;
             }
 
-            public Reference createCORBAReference(URI corbaURL, String objectName, ObjectName
containerName, String home) throws DeploymentException {
+            public Reference createCORBAReference(URI corbaURL, String objectName, AbstractName
containerName, String home) throws DeploymentException {
                 return null;
             }
 

Modified: geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/security-builder/src/java/org/apache/geronimo/security/deployment/LoginConfigBuilder.java
Fri Mar 10 14:05:58 2006
@@ -138,15 +138,8 @@
                         String value = trim(gerOptionType.getStringValue());
                         options.setProperty(key, value);
                     }
-                    try
-                    {
-                        loginModuleName = NameFactory.getChildName(parentName, NameFactory.LOGIN_MODULE,
name, LoginModuleGBean.GBEAN_INFO.getInterfaces());
-                        loginModuleReferencePatterns = new ReferencePatterns(loginModuleName);
-                    }
-                    catch (MalformedObjectNameException e)
-                    {
-                        throw new DeploymentException("cannot construct login module use
name from parts,", e);
-                    }
+                    loginModuleName = NameFactory.getChildName(parentName, NameFactory.LOGIN_MODULE,
name, LoginModuleGBean.GBEAN_INFO.getInterfaces());
+                    loginModuleReferencePatterns = new ReferencePatterns(loginModuleName);
                     GBeanData loginModuleGBeanData = new GBeanData(loginModuleName, LoginModuleGBean.GBEAN_INFO);
                     loginModuleGBeanData.setAttribute("loginDomainName", name);
                     loginModuleGBeanData.setAttribute("loginModuleClass", className);
@@ -161,14 +154,7 @@
                     throw new DeploymentException("Unknown abstract login module type: "
+ abstractLoginModule.getClass());
                 }
                 AbstractName thisName;
-                try
-                {
-                    thisName = NameFactory.getChildName(parentName, "LoginModuleUse", name,
JaasLoginModuleUse.GBEAN_INFO.getInterfaces());
-                }
-                catch (MalformedObjectNameException e)
-                {
-                    throw new DeploymentException("cannot construct login module use name
from parts,", e);
-                }
+                thisName = NameFactory.getChildName(parentName, "LoginModuleUse", name, JaasLoginModuleUse.GBEAN_INFO.getInterfaces());
                 GBeanData loginModuleUseGBeanData = new GBeanData(thisName, JaasLoginModuleUse.GBEAN_INFO);
                 loginModuleUseGBeanData.setAttribute("controlFlag", controlFlag);
                 loginModuleUseGBeanData.setReferencePatterns("LoginModule", loginModuleReferencePatterns);

Modified: geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Fri Mar 10 14:05:58 2006
@@ -198,15 +198,11 @@
 //            }
 //        } else {
             String namePart = gbean.getName();
-            try {
-                String j2eeType = gBeanInfo.getJ2eeType();
-                //todo investigate using the module type from the j2eecontext.
-                abstractName = NameFactory.getChildName(moduleName, j2eeType, namePart, gBeanInfo.getInterfaces());
+            String j2eeType = gBeanInfo.getJ2eeType();
+            //todo investigate using the module type from the j2eecontext.
+            abstractName = NameFactory.getChildName(moduleName, j2eeType, namePart, gBeanInfo.getInterfaces());
 //                nameMap.put("name", namePart);
 //                nameMap.put("type", j2eeType);
-            } catch (MalformedObjectNameException e) {
-                throw new DeploymentException("Invalid ObjectName: " + namePart, e);
-            }
 //        }
 //        AbstractName abstractName = new AbstractName(context.getConfigID(), nameMap, gBeanInfo.getInterfaces(),
abstractName);
         GBeanBuilder builder = new GBeanBuilder(abstractName, gBeanInfo, cl, context, moduleName,
xmlAttributeBuilderMap, xmlReferenceBuilderMap);

Modified: geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/service-builder/src/test/org/apache/geronimo/deployment/service/ServiceConfigBuilderTest.java
Fri Mar 10 14:05:58 2006
@@ -66,9 +66,9 @@
 //            new J2eeContextImpl("domain", "server", "null", "test", "configtest", "foo",
NameFactory.J2EE_MODULE);
             GbeanType[] gbeans = plan.getGbeanArray();
             ServiceConfigBuilder.addGBeans(gbeans, cl, j2eeContext, context);
-            Set beanDatas = context.listGBeans(new ObjectName("*:*"));
+            Set beanDatas = context.listGBeans(null);
             assertEquals(1, beanDatas.size());
-            ObjectName beanName = (ObjectName) beanDatas.iterator().next();
+            AbstractName beanName = (AbstractName) beanDatas.iterator().next();
             GBeanData data = context.getGBeanInstance(beanName);
             FooBarBean fooBarBean = (FooBarBean) data.getAttribute("fooBarBean");
             assertNotNull(fooBarBean);

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?rev=384933&r1=384932&r2=384933&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Fri Mar 10 14:05:58 2006
@@ -49,6 +49,7 @@
 import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
+import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.Module;
@@ -249,7 +250,7 @@
                     }
 
                     public Reference createCORBAReference(URI corbaURL,
-                                                          String objectName, ObjectName containerName,
+                                                          String objectName, AbstractName
containerName,
                                                           String home) throws DeploymentException
{
                         return null;
                     }



Mime
View raw message