geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r406864 - in /geronimo/branches/1.1/modules: client-builder/src/java/org/apache/geronimo/client/builder/ client-builder/src/schema/ j2ee-schema/src/java/org/apache/geronimo/schema/ jetty-builder/src/java/org/apache/geronimo/jetty/deployment...
Date Tue, 16 May 2006 07:36:45 GMT
Author: djencks
Date: Tue May 16 00:36:42 2006
New Revision: 406864

URL: http://svn.apache.org/viewcvs?rev=406864&view=rev
Log:
GERONIMO-1434 GBean References in jndi.  Allow specification of multiple interfaces and patterns

Modified:
    geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
    geronimo/branches/1.1/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
    geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
    geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
    geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
    geronimo/branches/1.1/modules/naming-builder/src/schema/geronimo-naming-1.1.xsd
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ConfigurationAwareReference.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/HandleDelegateReference.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
    geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
    geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java

Modified: geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/client-builder/src/java/org/apache/geronimo/client/builder/AppClientModuleBuilder.java
Tue May 16 00:36:42 2006
@@ -680,6 +680,7 @@
                 appClient.getResourceEnvRefArray(), geronimoAppClient.getResourceEnvRefArray(),
                 appClient.getMessageDestinationRefArray(),
                 appClient.getServiceRefArray(), geronimoAppClient.getServiceRefArray(),
+                geronimoAppClient.getGbeanRefArray(),
                 cl);
 
     }

Modified: geronimo/branches/1.1/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
(original)
+++ geronimo/branches/1.1/modules/client-builder/src/schema/geronimo-application-client-1.1.xsd
Tue May 16 00:36:42 2006
@@ -40,6 +40,7 @@
             <xs:element ref="sys:client-environment"/>
             <xs:element ref="sys:server-environment"/>
 
+            <xs:element ref="naming:gbean-ref" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="naming:ejb-ref" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="naming:service-ref" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element ref="naming:resource-ref" minOccurs="0" maxOccurs="unbounded"/>

Modified: geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
(original)
+++ geronimo/branches/1.1/modules/j2ee-schema/src/java/org/apache/geronimo/schema/SchemaConversionUtils.java
Tue May 16 00:36:42 2006
@@ -53,6 +53,7 @@
 
     static {
 
+        GERONIMO_SCHEMA_CONVERSIONS.put("gbean-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("ejb-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("ejb-local-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));
         GERONIMO_SCHEMA_CONVERSIONS.put("service-ref", new NamespaceElementConverter(GERONIMO_NAMING_NAMESPACE));

Modified: geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/jetty-builder/src/java/org/apache/geronimo/jetty/deployment/JettyModuleBuilder.java
Tue May 16 00:36:42 2006
@@ -77,7 +77,6 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
@@ -396,7 +395,7 @@
             // unsharableResources, applicationManagedSecurityResources
             GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
             //N.B. use earContext not moduleContext
-            ENCConfigBuilder.setResourceEnvironment(webModule.getModuleURI(), rebuilder,
webApp.getResourceRefArray(), jettyWebApp.getResourceRefArray());
+            ENCConfigBuilder.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(),
jettyWebApp.getResourceRefArray());
 
             webModuleData.setAttribute("contextPath", webModule.getContextRoot());
 
@@ -927,6 +926,7 @@
                 webApp.getResourceEnvRefArray(), jettyWebApp.getResourceEnvRefArray(),
                 webApp.getMessageDestinationRefArray(),
                 webApp.getServiceRefArray(), jettyWebApp.getServiceRefArray(),
+                jettyWebApp.getGbeanRefArray(),
                 cl);
     }
 

Modified: geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
(original)
+++ geronimo/branches/1.1/modules/naming-builder/src/java/org/apache/geronimo/naming/deployment/ENCConfigBuilder.java
Tue May 16 00:36:42 2006
@@ -17,21 +17,45 @@
 
 package org.apache.geronimo.naming.deployment;
 
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+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;
+import java.util.Arrays;
+
+import javax.naming.NamingException;
+import javax.naming.Reference;
+import javax.transaction.UserTransaction;
+import javax.xml.namespace.QName;
+
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
 import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
+import org.apache.geronimo.gbean.ReferencePatterns;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.ClassLoading;
+import org.apache.geronimo.kernel.GBeanNotFoundException;
 import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;
+import org.apache.geronimo.naming.reference.GBeanReference;
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbLocalRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerEjbRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanLocatorType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerGbeanRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
@@ -51,23 +75,6 @@
 import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
 import org.apache.geronimo.xbeans.j2ee.XsdStringType;
 
-import javax.naming.NamingException;
-import javax.naming.Reference;
-import javax.transaction.UserTransaction;
-import javax.xml.namespace.QName;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.ArrayList;
-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;
-
 /**
  * @version $Rev:385232 $ $Date$
  */
@@ -107,7 +114,7 @@
         } else {
             GerPatternType patternType = gerGbeanLocator.getPattern();
             //construct name from components
-            abstractNameQuery = buildAbstractNameQuery(patternType, j2eeType, null);
+            abstractNameQuery = buildAbstractNameQuery(patternType, j2eeType, null, null);
         }
         //TODO check that the query is satisfied.
         return abstractNameQuery;
@@ -131,8 +138,7 @@
 
     }
 
-    static void addResourceRefs(Configuration earContext, RefContext refContext, URI moduleURI,
ResourceRefType[] resourceRefs, Map refMap, ClassLoader cl, ComponentContextBuilder builder)
throws DeploymentException {
-        //TODO configid remove URI parameter?
+    static void addResourceRefs(Configuration earContext, RefContext refContext, ResourceRefType[]
resourceRefs, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException
{
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
@@ -218,7 +224,7 @@
         } else {
             //construct name from components
             GerPatternType patternType = gerResourceRef.getPattern();
-            containerId = buildAbstractNameQuery(patternType, type, NameFactory.RESOURCE_ADAPTER_MODULE);
+            containerId = buildAbstractNameQuery(patternType, type, NameFactory.RESOURCE_ADAPTER_MODULE,
null);
         }
         return containerId;
     }
@@ -271,7 +277,7 @@
         } else {
             //construct name from components
             GerPatternType patternType = gerResourceEnvRef.getPattern();
-            containerId = buildAbstractNameQuery(patternType, NameFactory.JCA_ADMIN_OBJECT,
NameFactory.RESOURCE_ADAPTER_MODULE);
+            containerId = buildAbstractNameQuery(patternType, NameFactory.JCA_ADMIN_OBJECT,
NameFactory.RESOURCE_ADAPTER_MODULE, null);
         }
         return containerId;
     }
@@ -368,7 +374,7 @@
                         cssBean = buildAbstractNameQuery(null, null, cssLink, NameFactory.CORBA_CSS,
NameFactory.EJB_MODULE);
                     } else {
                         GerPatternType css = remoteRef.getCss();
-                        cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE);
+                        cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS, NameFactory.EJB_MODULE,
null);
                     }
                     ejbReference = refContext.getCORBARemoteRef(earContext,
                             cssBean,
@@ -401,7 +407,7 @@
                     }
                 } else if (remoteRef != null) {
                     GerPatternType patternType = remoteRef.getPattern();
-                    containerQuery = buildAbstractNameQuery(patternType, null, NameFactory.EJB_MODULE);
+                    containerQuery = buildAbstractNameQuery(patternType, null, NameFactory.EJB_MODULE,
null);
                 }
                 ejbReference = refContext.getEJBRemoteRef(refName, ejbContext, ejbLink, requiredModule,
optionalModule, targetConfigId, containerQuery, isSession, home, remote);
             }
@@ -471,7 +477,7 @@
             }
         } else if (localRef != null) {
             GerPatternType patternType = localRef.getPattern();
-            containerQuery = buildAbstractNameQuery(patternType, null, NameFactory.EJB_MODULE);
+            containerQuery = buildAbstractNameQuery(patternType, null, NameFactory.EJB_MODULE,
null);
         }
         return refContext.getEJBLocalRef(refName, ejbContext, ejbLink, requiredModule, optionalModule,
targetConfigId, containerQuery, isSession, localHome, local);
     }
@@ -653,8 +659,7 @@
     }
 
 
-    public static void setResourceEnvironment(URI uri, ResourceEnvironmentBuilder builder,
ResourceRefType[] resourceRefs, GerResourceRefType[] gerResourceRefs) {
-        //TODO configid remove URI parameter?
+    public static void setResourceEnvironment(ResourceEnvironmentBuilder builder, ResourceRefType[]
resourceRefs, GerResourceRefType[] gerResourceRefs) {
         Map refMap = mapResourceRefs(gerResourceRefs);
         Set unshareableResources = new HashSet();
         Set applicationManagedSecurityResources = new HashSet();
@@ -698,6 +703,7 @@
                                             MessageDestinationRefType[] messageDestinationRefs,
                                             ServiceRefType[] serviceRefs,
                                             GerServiceRefType[] gerServiceRefs,
+                                            GerGbeanRefType[] gerGbeanRefs,
                                             ClassLoader cl) throws DeploymentException {
         ComponentContextBuilder builder = new ComponentContextBuilder();
         RefContext refContext = earContext.getRefContext();
@@ -728,7 +734,7 @@
         addEJBLocalRefs(ejbContext, refContext, moduleURI, ejbLocalRefs, mapEjbLocalRefs(gerEjbLocalRef),
cl, builder);
 
 // resource-ref
-        addResourceRefs(earConfiguration, refContext, moduleURI, resourceRefs, mapResourceRefs(gerResourceRef),
cl, builder);
+        addResourceRefs(earConfiguration, refContext, resourceRefs, mapResourceRefs(gerResourceRef),
cl, builder);
 
 // resource-env-ref
         addResourceEnvRefs(earConfiguration, refContext, resourceEnvRefs, mapResourceEnvRefs(gerResourceEnvRef),
cl, builder);
@@ -741,9 +747,58 @@
         Map serviceRefMap = mapServiceRefs(gerServiceRefs);
         addServiceRefs(earContext, module, serviceRefs, serviceRefMap, cl, builder);
 
+        addGBeanRefs(earContext, builder, refContext, gerGbeanRefs, cl);
+
         return builder.getContext();
     }
 
+    private static void addGBeanRefs(EARContext earContext, ComponentContextBuilder builder,
RefContext refContext, GerGbeanRefType[] gerGbeanRefs, ClassLoader cl) throws DeploymentException
{
+        if (null == gerGbeanRefs) {
+            return;
+        }
+
+
+        for (int i = 0; i < gerGbeanRefs.length; i++) {
+            GerGbeanRefType gerGbeanRef = gerGbeanRefs[i];
+            addGBeanRef(earContext, builder, refContext, gerGbeanRef, cl);
+        }
+    }
+
+    private static void addGBeanRef(EARContext earContext, ComponentContextBuilder builder,
RefContext refContext, GerGbeanRefType gerGbeanRef, ClassLoader cl) throws DeploymentException{
+        GerPatternType[] gbeanLocatorArray = gerGbeanRef.getPatternArray();
+
+        String[] interfaceTypesArray = gerGbeanRef.getRefTypeArray();
+        Set interfaceTypes = new HashSet(Arrays.asList(interfaceTypesArray));
+        Set queries = new HashSet();
+        for (int i = 0; i < gbeanLocatorArray.length; i++) {
+            GerPatternType patternType = gbeanLocatorArray[i];
+            AbstractNameQuery abstractNameQuery = buildAbstractNameQuery(patternType, null,
null, interfaceTypes);
+            queries.add(abstractNameQuery);
+        }
+
+        GBeanData gBeanData;
+        Configuration configuration = earContext.getConfiguration();
+        try {
+            gBeanData = configuration.findGBeanData(queries);
+        } catch (GBeanNotFoundException e) {
+            throw new DeploymentException("Could not resolve reference at deploy time for
queries " + queries, e);
+        }
+
+        if (interfaceTypes.isEmpty()) {
+            interfaceTypes.add(gBeanData.getGBeanInfo().getClassName());
+        }
+        Class gBeanType;
+        try {
+            gBeanType = ClassLoading.loadClass(gBeanData.getGBeanInfo().getClassName(), cl);
+        } catch (ClassNotFoundException e) {
+            throw new DeploymentException("Cannot load GBean class", e);
+        }
+
+        String refName = gerGbeanRef.getRefName();
+
+        builder.bind(refName, new GBeanReference(configuration.getId(), queries, gBeanType));
+    }
+
     private static Map mapEjbRefs(GerEjbRefType[] refs) {
         Map refMap = new HashMap();
         if (refs != null) {
@@ -801,7 +856,7 @@
     }
 
     //TODO consider including target interface
-    public static AbstractNameQuery buildAbstractNameQuery(GerPatternType pattern, String
type, String moduleType) {
+    public static AbstractNameQuery buildAbstractNameQuery(GerPatternType pattern, String
type, String moduleType, Set interfaceTypes) {
         String groupId = pattern.isSetGroupId() ? pattern.getGroupId().trim() : null;
         String artifactid = pattern.isSetArtifactId() ? pattern.getArtifactId().trim() :
null;
         String version = pattern.isSetVersion() ? pattern.getVersion().trim() : null;
@@ -814,10 +869,10 @@
         if (type != null) {
             nameMap.put("j2eeType", type);
         }
-        if (module != null) {
+        if (module != null && moduleType != null) {
             nameMap.put(moduleType, module);
         }
-        return new AbstractNameQuery(artifact, nameMap);
+        return new AbstractNameQuery(artifact, nameMap, interfaceTypes);
     }
 
     public static AbstractNameQuery buildAbstractNameQuery(Artifact configId, String module,
String name, String type, String moduleType) {

Modified: geronimo/branches/1.1/modules/naming-builder/src/schema/geronimo-naming-1.1.xsd
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming-builder/src/schema/geronimo-naming-1.1.xsd?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming-builder/src/schema/geronimo-naming-1.1.xsd (original)
+++ geronimo/branches/1.1/modules/naming-builder/src/schema/geronimo-naming-1.1.xsd Tue May
16 00:36:42 2006
@@ -36,6 +36,7 @@
     </xsd:annotation>
 
 
+    <xsd:element name="gbean-ref" type="gernaming:gbean-refType"/>
     <xsd:element name="ejb-ref" type="gernaming:ejb-refType"/>
     <!--    <xsd:element name="ejb-local-ref" type="gernaming:ejb-local-refType"/>-->
     <xsd:element name="service-ref" type="gernaming:service-refType"/>
@@ -108,8 +109,7 @@
     <xsd:complexType name="gbean-refType">
         <xsd:sequence>
             <xsd:element name="ref-name" type="xsd:string"/>
-            <xsd:element name="ref-type" type="xsd:string"/>
-            <xsd:element name="proxy-type" type="xsd:string" minOccurs="0"/>
+            <xsd:element name="ref-type" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
             <xsd:choice minOccurs="0" maxOccurs="unbounded">
                 <xsd:element name="pattern" type="gernaming:patternType"/>
             </xsd:choice>

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ConfigurationAwareReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ConfigurationAwareReference.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ConfigurationAwareReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ConfigurationAwareReference.java
Tue May 16 00:36:42 2006
@@ -27,6 +27,7 @@
 import org.apache.geronimo.kernel.GBeanNotFoundException;
 
 import java.util.Set;
+import java.util.Collections;
 
 /**
  * @version $Rev:$ $Date:$
@@ -34,11 +35,16 @@
 public abstract class ConfigurationAwareReference extends SimpleAwareReference {
 
     private final Artifact configId;
-    protected final AbstractNameQuery abstractNameQuery;
+    protected final Set abstractNameQueries;
 
     protected ConfigurationAwareReference(Artifact configId, AbstractNameQuery abstractNameQuery)
{
         this.configId = configId;
-        this.abstractNameQuery = abstractNameQuery;
+        this.abstractNameQueries = Collections.singleton(abstractNameQuery);
+    }
+
+    protected ConfigurationAwareReference(Artifact configId, Set abstractNameQueries) {
+        this.configId = configId;
+        this.abstractNameQueries = abstractNameQueries;
     }
 
     public Configuration getConfiguration() {
@@ -50,13 +56,13 @@
     public AbstractName resolveTargetName() throws GBeanNotFoundException {
         Configuration configuration = getConfiguration();
         try {
-            return configuration.findGBean(abstractNameQuery);
+            return configuration.findGBean(abstractNameQueries);
         } catch (GBeanNotFoundException e) {
-            Set results = getKernel().listGBeans(abstractNameQuery);
+            Set results = getKernel().listGBeans(abstractNameQueries);
             if (results.size() == 1) {
                 return (AbstractName) results.iterator().next();
             }
-            throw new GBeanNotFoundException("Name query " + abstractNameQuery + " not satisfied
in kernel, matches: " + results, e);
+            throw new GBeanNotFoundException("Name query " + abstractNameQueries + " not
satisfied in kernel, matches: " + results, e);
         }
     }
 

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/GBeanReference.java
Tue May 16 00:36:42 2006
@@ -16,6 +16,8 @@
  */
 package org.apache.geronimo.naming.reference;
 
+import java.util.Set;
+
 import javax.naming.NameNotFoundException;
 
 import org.apache.geronimo.kernel.repository.Artifact;
@@ -29,8 +31,8 @@
 public class GBeanReference extends ConfigurationAwareReference {
     private final Class type;
 
-    public GBeanReference(Artifact configId, AbstractNameQuery abstractNameQuery, Class type)
{
-        super(configId, abstractNameQuery);
+    public GBeanReference(Artifact configId, Set abstractNameQueries, Class type) {
+        super(configId, abstractNameQueries);
         this.type = type;
     }
 
@@ -43,7 +45,7 @@
         try {
             target = resolveTargetName();
         } catch (GBeanNotFoundException e) {
-            throw (NameNotFoundException)new NameNotFoundException("Could not resolve gbean
from name query: " + abstractNameQuery).initCause(e);
+            throw (NameNotFoundException)new NameNotFoundException("Could not resolve gbean
from name query: " + abstractNameQueries).initCause(e);
         }
         try {
             return getKernel().getGBean(target);

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/HandleDelegateReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/HandleDelegateReference.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/HandleDelegateReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/HandleDelegateReference.java
Tue May 16 00:36:42 2006
@@ -16,7 +16,6 @@
  */
 package org.apache.geronimo.naming.reference;
 
-import javax.management.ObjectName;
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingException;
 
@@ -44,7 +43,7 @@
             AbstractName targetName = resolveTargetName();
             return kernel.getAttribute(targetName, "handleDelegate");
         } catch (Exception e) {
-            throw (NameNotFoundException) new NameNotFoundException("Error getting handle
delegate attribute from CORBAGBean: name query =" + abstractNameQuery).initCause(e);
+            throw (NameNotFoundException) new NameNotFoundException("Error getting handle
delegate attribute from CORBAGBean: name query =" + abstractNameQueries).initCause(e);
         }
     }
 }

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ORBReference.java
Tue May 16 00:36:42 2006
@@ -43,7 +43,7 @@
             AbstractName targetName = resolveTargetName();
             return kernel.getAttribute(targetName, "ORB");
         } catch (Exception e) {
-            throw (NameNotFoundException) new NameNotFoundException("Error getting ORB attribute
from CORBAGBean: name query =" + abstractNameQuery).initCause(e);
+            throw (NameNotFoundException) new NameNotFoundException("Error getting ORB attribute
from CORBAGBean: name query =" + abstractNameQueries).initCause(e);
         }
     }
 }

Modified: geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
(original)
+++ geronimo/branches/1.1/modules/naming/src/java/org/apache/geronimo/naming/reference/ResourceReference.java
Tue May 16 00:36:42 2006
@@ -53,7 +53,7 @@
         try {
             target = resolveTargetName();
         } catch (GBeanNotFoundException e) {
-            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name
query: " + abstractNameQuery).initCause(e);
+            throw (NameNotFoundException) new NameNotFoundException("Could not resolve name
query: " + abstractNameQueries).initCause(e);
         }
 
         Object proxy;

Modified: geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=406864&r1=406863&r2=406864&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/branches/1.1/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Tue May 16 00:36:42 2006
@@ -61,7 +61,6 @@
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
-import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
@@ -322,7 +321,7 @@
             // unsharableResources, applicationManagedSecurityResources
             GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
             //N.B. use earContext not moduleContext
-            ENCConfigBuilder.setResourceEnvironment(webModule.getModuleURI(), rebuilder,
webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray());
+            ENCConfigBuilder.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(),
tomcatWebApp.getResourceRefArray());
 
             webModuleData.setReferencePattern("TransactionContextManager", earContext.getTransactionContextManagerObjectName());
             webModuleData.setReferencePattern("TrackedConnectionAssociator", earContext.getConnectionTrackerObjectName());
@@ -477,6 +476,7 @@
                 webApp.getResourceEnvRefArray(), tomcatWebApp.getResourceEnvRefArray(),
                 webApp.getMessageDestinationRefArray(),
                 webApp.getServiceRefArray(), tomcatWebApp.getServiceRefArray(),
+                tomcatWebApp.getGbeanRefArray(),
                 cl);
     }
     public static final GBeanInfo GBEAN_INFO;



Mime
View raw message