geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r386000 [2/2] - in /geronimo/branches/1.1/modules: client-builder/src/java/org/apache/geronimo/client/builder/ connector-builder/src/java/org/apache/geronimo/connector/deployment/ connector-builder/src/test/org/apache/geronimo/connector/dep...
Date Wed, 15 Mar 2006 08:19:13 GMT
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=386000&r1=385999&r2=386000&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 Wed Mar 15 00:19:07 2006
@@ -19,24 +19,24 @@
 
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.common.UnresolvedReferenceException;
-import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.NamingContext;
 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.config.Configuration;
 import org.apache.geronimo.kernel.repository.Artifact;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;
 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.GerMessageDestinationType;
+import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceEnvRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
 import org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerPatternType;
 import org.apache.geronimo.xbeans.j2ee.EjbLocalRefType;
 import org.apache.geronimo.xbeans.j2ee.EjbRefType;
 import org.apache.geronimo.xbeans.j2ee.EnvEntryType;
@@ -50,7 +50,6 @@
 import org.apache.geronimo.xbeans.j2ee.ServiceRefType;
 import org.apache.geronimo.xbeans.j2ee.XsdQNameType;
 import org.apache.geronimo.xbeans.j2ee.XsdStringType;
-import org.apache.geronimo.gbean.AbstractNameQuery;
 
 import javax.naming.NamingException;
 import javax.naming.Reference;
@@ -97,12 +96,12 @@
     }
 
 
-    public static AbstractNameQuery getGBeanId(String j2eeType, GerGbeanLocatorType gerGbeanLocator, DeploymentContext context) throws DeploymentException {
+    public static AbstractNameQuery getGBeanQuery(String j2eeType, GerGbeanLocatorType gerGbeanLocator) {
         AbstractNameQuery abstractNameQuery;
         if (gerGbeanLocator.isSetGbeanLink()) {
             //exact match
             String linkName = gerGbeanLocator.getGbeanLink().trim();
-            abstractNameQuery = buildAbstractNameQuery(null, j2eeType, linkName);
+            abstractNameQuery = buildAbstractNameQuery(null, null, j2eeType, linkName);
 
         } else {
             GerPatternType patternType = gerGbeanLocator.getPattern();
@@ -131,24 +130,23 @@
 
     }
 
-    static void addResourceRefs(EARContext earContext, URI moduleURI, ResourceRefType[] resourceRefs, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addResourceRefs(Configuration earContext, RefContext refContext, URI moduleURI, ResourceRefType[] resourceRefs, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
-        RefContext refContext = earContext.getRefContext();
 
         for (int i = 0; i < resourceRefs.length; i++) {
             ResourceRefType resourceRef = resourceRefs[i];
             String name = getStringValue(resourceRef.getResRefName());
             String type = getStringValue(resourceRef.getResType());
             GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(name);
-            Class iface = null;
+            Class iface;
             try {
                 iface = cl.loadClass(type);
             } catch (ClassNotFoundException e) {
                 throw new DeploymentException("could not load class " + type, e);
             }
-            Reference ref = null;
+            Reference ref;
             if (iface == URL.class) {
                 if (gerResourceRef == null || !gerResourceRef.isSetUrl()) {
                     throw new DeploymentException("No url supplied to resolve: " + name);
@@ -172,10 +170,10 @@
                     j2eeType = NameFactory.JCA_MANAGED_CONNECTION_FACTORY;
                 }
                 try {
-                    AbstractNameQuery containerId = getResourceContainerId(name, j2eeType, moduleURI, gerResourceRef, earContext);
+                    AbstractNameQuery containerId = getResourceContainerId(name, j2eeType, moduleURI, gerResourceRef);
 
                     //TODO configid not sure what knownParent is supposed to be
-                    ref = refContext.getConnectionFactoryRef(containerId, iface, earContext.getConfiguration());
+                    ref = refContext.getConnectionFactoryRef(containerId, iface, earContext);
                     builder.bind(name, ref);
                 } catch (UnresolvedReferenceException e) {
                     throw new DeploymentException("Unable to resolve resource reference '" + name + "' (" + (e.isMultiple() ? "found multiple matching resources" : "no matching resources found") + ")");
@@ -185,14 +183,13 @@
 
     }
 
-    private static AbstractNameQuery getResourceContainerId(String name, String type, URI moduleURI, GerResourceRefType gerResourceRef, EARContext context) throws DeploymentException {
+    private static AbstractNameQuery getResourceContainerId(String name, String type, URI moduleURI, GerResourceRefType gerResourceRef) {
         AbstractNameQuery containerId;
-        String module = moduleURI == null? null: moduleURI.toString();
-        RefContext refContext = context.getRefContext();
+        String module = moduleURI == null ? null : moduleURI.toString();
         if (gerResourceRef == null) {
-            containerId = buildAbstractNameQuery(module, type, name);
+            containerId = buildAbstractNameQuery(null, module, type, name);
         } else if (gerResourceRef.isSetResourceLink()) {
-            containerId = buildAbstractNameQuery(module, type, gerResourceRef.getResourceLink().trim());
+            containerId = buildAbstractNameQuery(null, module, type, gerResourceRef.getResourceLink().trim());
         } else {
             //construct name from components
             GerPatternType patternType = gerResourceRef.getPattern();
@@ -201,7 +198,7 @@
         return containerId;
     }
 
-    static void addResourceEnvRefs(EARContext earContext, ResourceEnvRefType[] resourceEnvRefArray, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addResourceEnvRefs(Configuration earContext, RefContext refContext, ResourceEnvRefType[] resourceEnvRefArray, Map refMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         if (refMap == null) {
             refMap = Collections.EMPTY_MAP;
         }
@@ -210,7 +207,7 @@
             ResourceEnvRefType resourceEnvRef = resourceEnvRefArray[i];
             String name = getStringValue(resourceEnvRef.getResourceEnvRefName());
             String type = getStringValue(resourceEnvRef.getResourceEnvRefType());
-            Class iface = null;
+            Class iface;
             try {
                 iface = cl.loadClass(type);
             } catch (ClassNotFoundException e) {
@@ -218,9 +215,9 @@
             }
             GerResourceEnvRefType gerResourceEnvRef = (GerResourceEnvRefType) refMap.get(name);
             try {
-                AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef, earContext);
+                AbstractNameQuery containerId = getAdminObjectContainerId(name, gerResourceEnvRef);
                 //TODO not sure what knownParent is supposed to be
-                Reference ref = earContext.getRefContext().getAdminObjectRef(containerId, iface, earContext.getConfiguration());
+                Reference ref = refContext.getAdminObjectRef(containerId, iface, earContext);
 
                 builder.bind(name, ref);
             } catch (UnresolvedReferenceException e) {
@@ -229,19 +226,18 @@
         }
     }
 
-    private static AbstractNameQuery getAdminObjectContainerId(String name, GerResourceEnvRefType gerResourceEnvRef, EARContext context) throws DeploymentException {
+    private static AbstractNameQuery getAdminObjectContainerId(String name, GerResourceEnvRefType gerResourceEnvRef) {
         AbstractNameQuery containerId;
-        RefContext refContext = context.getRefContext();
         if (gerResourceEnvRef == null) {
-            containerId = buildAbstractNameQuery(null, NameFactory.JCA_ADMIN_OBJECT, name);
+            containerId = buildAbstractNameQuery(null, null, NameFactory.JCA_ADMIN_OBJECT, name);
         } else if (gerResourceEnvRef.isSetMessageDestinationLink()) {
-            containerId = buildAbstractNameQuery(null, NameFactory.JCA_ADMIN_OBJECT, gerResourceEnvRef.getMessageDestinationLink().trim());
+            containerId = buildAbstractNameQuery(null, null, NameFactory.JCA_ADMIN_OBJECT, gerResourceEnvRef.getMessageDestinationLink().trim());
         } else if (gerResourceEnvRef.isSetAdminObjectLink()) {
             String moduleURI = null;
             if (gerResourceEnvRef.isSetAdminObjectModule()) {
-                    moduleURI = gerResourceEnvRef.getAdminObjectModule().trim();
+                moduleURI = gerResourceEnvRef.getAdminObjectModule().trim();
             }
-            containerId = buildAbstractNameQuery(moduleURI, NameFactory.JCA_ADMIN_OBJECT, gerResourceEnvRef.getAdminObjectLink().trim());
+            containerId = buildAbstractNameQuery(null, moduleURI, NameFactory.JCA_ADMIN_OBJECT, gerResourceEnvRef.getAdminObjectLink().trim());
         } else {
             //construct name from components
             GerPatternType patternType = gerResourceEnvRef.getPattern();
@@ -250,13 +246,13 @@
         return containerId;
     }
 
-    static void addMessageDestinationRefs(RefContext refContext, EARContext earContext, MessageDestinationRefType[] messageDestinationRefs, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addMessageDestinationRefs(Configuration earContext, RefContext refContext, MessageDestinationRefType[] messageDestinationRefs, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         for (int i = 0; i < messageDestinationRefs.length; i++) {
             MessageDestinationRefType messageDestinationRef = messageDestinationRefs[i];
             String name = getStringValue(messageDestinationRef.getMessageDestinationRefName());
             String linkName = getStringValue(messageDestinationRef.getMessageDestinationLink());
             String type = getStringValue(messageDestinationRef.getMessageDestinationType());
-            Class iface = null;
+            Class iface;
             try {
                 iface = cl.loadClass(type);
             } catch (ClassNotFoundException e) {
@@ -281,16 +277,16 @@
 
             //try to resolve ref based only matching resource-ref-name
             //throws exception if it can't locate ref.
-            AbstractNameQuery containerId = buildAbstractNameQuery(moduleURI, NameFactory.JCA_ADMIN_OBJECT, linkName);
+            AbstractNameQuery containerId = buildAbstractNameQuery(null, moduleURI, NameFactory.JCA_ADMIN_OBJECT, linkName);
             //TODO configid not sure what knwonParent is suppsed to be
-            Reference ref = refContext.getAdminObjectRef(containerId, iface, earContext.getConfiguration());
+            Reference ref = refContext.getAdminObjectRef(containerId, iface, earContext);
             builder.bind(name, ref);
 
         }
 
     }
 
-    static void addEJBRefs(NamingContext earContext, NamingContext ejbContext, RefContext refContext, URI moduleURI, EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addEJBRefs(Configuration earContext, Configuration ejbContext, RefContext refContext, URI moduleURI, EjbRefType[] ejbRefs, Map ejbRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         for (int i = 0; i < ejbRefs.length; i++) {
             EjbRefType ejbRef = ejbRefs[i];
 
@@ -315,8 +311,8 @@
 
             if (isSession && remote.equals("javax.management.j2ee.Management") && home.equals("javax.management.j2ee.ManagementHome"))
             {
-                String mejbName = refContext.getMEJBName();
-                ejbReference = refContext.getEJBRemoteRef(mejbName, isSession, home, remote);
+                AbstractNameQuery query = new AbstractNameQuery(null, Collections.singletonMap("name", "ejb/mgmt/MEJB"));
+                ejbReference = refContext.getEJBRemoteRef(null, null, null, null, query, isSession, home, remote, ejbContext);
             } else {
 
                 String ejbLink = null;
@@ -326,50 +322,49 @@
                         AbstractNameQuery cssBean;
                         if (remoteRef.isSetCssLink()) {
                             String cssLink = remoteRef.getCssLink().trim();
-                            //TODO is this correct?
-                            String moduleType = null;
-                            cssBean = buildAbstractNameQuery(null, NameFactory.CORBA_CSS, cssLink);
+                            cssBean = buildAbstractNameQuery(null, null, NameFactory.CORBA_CSS, cssLink);
                         } else {
                             GerPatternType css = remoteRef.getCss();
                             cssBean = buildAbstractNameQuery(css, NameFactory.CORBA_CSS);
                         }
-                        //TODO configID this is probably completely messed up
-                        ejbReference = refContext.getCORBARemoteRef(earContext.getConfigID(), cssBean, new URI(getStringValue(remoteRef.getNsCorbaloc())),
+                        ejbReference = refContext.getCORBARemoteRef(earContext,
+                                cssBean,
+                                new URI(getStringValue(remoteRef.getNsCorbaloc())),
                                 getStringValue(remoteRef.getName()),
                                 home);
                     } catch (URISyntaxException e) {
                         throw new DeploymentException("Could not construct CORBA NameServer URI: " + remoteRef.getNsCorbaloc(), e);
                     }
                 } else {
+                    Artifact targetConfigId = null;
+                    String optionalModule = moduleURI == null ? null : moduleURI.toString();
+                    String requiredModule = null;
+                    AbstractNameQuery containerId = null;
                     if (remoteRef != null && remoteRef.isSetEjbLink()) {
                         ejbLink = remoteRef.getEjbLink();
                     } else if (ejbRef.isSetEjbLink()) {
                         ejbLink = getStringValue(ejbRef.getEjbLink());
+                        targetConfigId = ejbContext.getId();
                     }
-                    AbstractNameQuery containerId;
-                    String module = moduleURI == null? null: moduleURI.toString();
                     if (ejbLink != null) {
-                        //TODO 1. include artifact, we know it must be in this app.
-                        //TODO 2. use the isSession and reason about stateful/stateless
-                        containerId = buildAbstractNameQuery(module, null, ejbLink);
-                        //TODO WRONG
-                        ejbReference = refContext.getEJBRemoteRef(moduleURI, ejbLink, isSession, home, remote, ejbContext);
+                        String[] bits = ejbLink.split("#");
+                        if (bits.length == 2) {
+                            //look only in specified module.
+                            requiredModule = bits[0];
+                            ejbLink = bits[1];
+                        }
                     } else if (remoteRef != null) {
-                        //TODO 2 as above
                         GerPatternType patternType = remoteRef.getPattern();
                         containerId = buildAbstractNameQuery(patternType, null);
-                        //TODO WRONG
-                        ejbReference = refContext.getEJBRemoteRef(moduleURI, ejbLink, isSession, home, remote, ejbContext);
-                    } else {
-                        ejbReference = refContext.getImplicitEJBRemoteRef(moduleURI, ejbRefName, isSession, home, remote, ejbContext);
                     }
+                    ejbReference = refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, home, remote, ejbContext);
                 }
             }
             builder.bind(ejbRefName, ejbReference);
         }
     }
 
-    static void addEJBLocalRefs(NamingContext ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
+    static void addEJBLocalRefs(Configuration ejbContext, RefContext refContext, URI moduleURI, EjbLocalRefType[] ejbLocalRefs, Map ejbLocalRefMap, ClassLoader cl, ComponentContextBuilder builder) throws DeploymentException {
         for (int i = 0; i < ejbLocalRefs.length; i++) {
             EjbLocalRefType ejbLocalRef = ejbLocalRefs[i];
 
@@ -399,25 +394,28 @@
                 ejbLink = getStringValue(ejbLocalRef.getEjbLink());
             }
 
-            Reference ejbReference;
-            AbstractNameQuery containerId;
-            String module = moduleURI == null? null: moduleURI.toString();
+            Artifact targetConfigId = null;
+            String optionalModule = moduleURI == null ? null : moduleURI.toString();
+            String requiredModule = null;
+            AbstractNameQuery containerId = null;
+            if (localRef != null && localRef.isSetEjbLink()) {
+                ejbLink = localRef.getEjbLink();
+            } else if (ejbLocalRef.isSetEjbLink()) {
+                ejbLink = getStringValue(ejbLocalRef.getEjbLink());
+                targetConfigId = ejbContext.getId();
+            }
             if (ejbLink != null) {
-                //TODO 1. include artifact, we know it must be in this app.
-                //TODO 2. use the isSession and reason about stateful/stateless
-                containerId = buildAbstractNameQuery(module, null, ejbLink);
-                //TODO WRONG
-                ejbReference = refContext.getEJBLocalRef(moduleURI, ejbLink, isSession, localHome, local, ejbContext);
+                String[] bits = ejbLink.split("#");
+                if (bits.length == 2) {
+                    //look only in specified module.
+                    requiredModule = bits[0];
+                    ejbLink = bits[1];
+                }
             } else if (localRef != null) {
-                //TODO 2 as above
                 GerPatternType patternType = localRef.getPattern();
                 containerId = buildAbstractNameQuery(patternType, null);
-                //TODO WRONG
-                ejbReference = refContext.getEJBLocalRef(moduleURI, ejbLink, isSession, localHome, local, ejbContext);
-
-            } else {
-                ejbReference = refContext.getImplicitEJBLocalRef(moduleURI, ejbLink, isSession, localHome, local, ejbContext);
             }
+            Reference ejbReference = refContext.getEJBRemoteRef(requiredModule, optionalModule, ejbLink, targetConfigId, containerId, isSession, localHome, local, ejbContext);
             builder.bind(ejbRefName, ejbReference);
         }
     }
@@ -435,7 +433,7 @@
 //            Map credentialsNameMap = (Map) serviceRefCredentialsNameMap.get(name);
             String serviceInterfaceName = getStringValue(serviceRef.getServiceInterface());
             assureInterface(serviceInterfaceName, "javax.xml.rpc.Service", "[Web]Service", cl);
-            Class serviceInterface = null;
+            Class serviceInterface;
             try {
                 serviceInterface = cl.loadClass(serviceInterfaceName);
             } catch (ClassNotFoundException e) {
@@ -500,7 +498,7 @@
             }
 //            Set portNames = new HashSet(Arrays.asList(portNameArray));
             String handlerClassName = handler.getHandlerClass().getStringValue().trim();
-            Class handlerClass = null;
+            Class handlerClass;
             try {
                 handlerClass = ClassLoading.loadClass(handlerClassName, classLoader);
             } catch (ClassNotFoundException e) {
@@ -551,7 +549,7 @@
         if (interfaceName == null || interfaceName.equals("")) {
             throw new DeploymentException("interface name cannot be blank");
         }
-        Class clazz = null;
+        Class clazz;
         try {
             clazz = cl.loadClass(interfaceName);
         } catch (ClassNotFoundException e) {
@@ -560,7 +558,7 @@
         if (!clazz.isInterface()) {
             throw new DeploymentException(interfaceType + " interface is not an interface: " + interfaceName);
         }
-        Class superInterface = null;
+        Class superInterface;
         try {
             superInterface = cl.loadClass(superInterfaceName);
         } catch (ClassNotFoundException e) {
@@ -593,7 +591,7 @@
     }
 
 
-    public static void setResourceEnvironment(EARContext earContext, URI uri, ResourceEnvironmentBuilder builder, ResourceRefType[] resourceRefs, GerResourceRefType[] gerResourceRefs) throws DeploymentException {
+    public static void setResourceEnvironment(URI uri, ResourceEnvironmentBuilder builder, ResourceRefType[] resourceRefs, GerResourceRefType[] gerResourceRefs) {
         Map refMap = mapResourceRefs(gerResourceRefs);
         Set unshareableResources = new HashSet();
         Set applicationManagedSecurityResources = new HashSet();
@@ -607,7 +605,7 @@
                     && !JAXR_CONNECTION_FACTORY_CLASS.equals(type)) {
 
                 GerResourceRefType gerResourceRef = (GerResourceRefType) refMap.get(resourceRefType.getResRefName().getStringValue());
-                AbstractNameQuery containerId = getResourceContainerId(getStringValue(resourceRefType.getResRefName()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, uri, gerResourceRef, earContext);
+                AbstractNameQuery containerId = getResourceContainerId(getStringValue(resourceRefType.getResRefName()), NameFactory.JCA_MANAGED_CONNECTION_FACTORY, uri, gerResourceRef);
 
                 if ("Unshareable".equals(getStringValue(resourceRefType.getResSharingScope()))) {
                     unshareableResources.add(containerId);
@@ -622,7 +620,7 @@
     }
 
     public static Map buildComponentContext(EARContext earContext,
-                                            NamingContext ejbContext,
+                                            Configuration ejbContext,
                                             Module module,
                                             UserTransaction userTransaction,
                                             EnvEntryType[] envEntries,
@@ -640,6 +638,7 @@
                                             ClassLoader cl) throws DeploymentException {
         ComponentContextBuilder builder = new ComponentContextBuilder();
         RefContext refContext = earContext.getRefContext();
+        Configuration earConfiguration = earContext.getConfiguration();
 
         if (userTransaction != null) {
             builder.addUserTransaction(userTransaction);
@@ -647,10 +646,10 @@
 
         AbstractNameQuery corbaGBean = earContext.getCORBAGBeanObjectName();
         if (corbaGBean != null) {
-            builder.addORB(earContext.getConfigID(), corbaGBean);
+            builder.addORB(earConfiguration.getId(), corbaGBean);
         }
 
-        Object handleDelegateReference = earContext.getRefContext().getHandleDelegateReference();
+        Object handleDelegateReference = refContext.getHandleDelegateReference();
         if (handleDelegateReference != null) {
             builder.addHandleDelegateReference(handleDelegateReference);
         }
@@ -660,22 +659,22 @@
         addEnvEntries(envEntries, builder, cl);
 
         if (ejbContext == null) {
-            ejbContext = earContext;
+            ejbContext = earConfiguration;
         }
 
 // ejb-ref
-        addEJBRefs(earContext, ejbContext, refContext, moduleURI, ejbRefs, mapEjbRefs(gerEjbRefs), cl, builder);
+        addEJBRefs(earConfiguration, ejbContext, refContext, moduleURI, ejbRefs, mapEjbRefs(gerEjbRefs), cl, builder);
 
 // ejb-local-ref
         addEJBLocalRefs(ejbContext, refContext, moduleURI, ejbLocalRefs, mapEjbLocalRefs(gerEjbLocalRef), cl, builder);
 
 // resource-ref
-        addResourceRefs(earContext, moduleURI, resourceRefs, mapResourceRefs(gerResourceRef), cl, builder);
+        addResourceRefs(earConfiguration, refContext, moduleURI, resourceRefs, mapResourceRefs(gerResourceRef), cl, builder);
 
 // resource-env-ref
-        addResourceEnvRefs(earContext, resourceEnvRefs, mapResourceEnvRefs(gerResourceEnvRef), cl, builder);
+        addResourceEnvRefs(earConfiguration, refContext, resourceEnvRefs, mapResourceEnvRefs(gerResourceEnvRef), cl, builder);
 
-        addMessageDestinationRefs(earContext.getRefContext(), earContext, messageDestinationRefs, cl, builder);
+        addMessageDestinationRefs(earConfiguration, refContext, messageDestinationRefs, cl, builder);
 
 //        Map serviceRefMap = new HashMap();
 //        Map serviceRefCredentialsNameMap = new HashMap();
@@ -759,10 +758,10 @@
         if (module != null) {
             nameMap.put("module", module);
         }
-        return new AbstractNameQuery(artifact, nameMap, Collections.EMPTY_SET);
+        return new AbstractNameQuery(artifact, nameMap);
     }
 
-    public static AbstractNameQuery buildAbstractNameQuery(String module, String type, String name) {
+    public static AbstractNameQuery buildAbstractNameQuery(Artifact configId, String module, String type, String name) {
         Map nameMap = new HashMap();
         nameMap.put("name", name);
         if (type != null) {
@@ -771,7 +770,7 @@
         if (module != null) {
             nameMap.put("module", module);
         }
-        return new AbstractNameQuery(null, nameMap, Collections.EMPTY_SET);
+        return new AbstractNameQuery(configId, nameMap);
     }
 
 

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=386000&r1=385999&r2=386000&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 Wed Mar 15 00:19:07 2006
@@ -16,137 +16,137 @@
  */
 package org.apache.geronimo.naming.deployment;
 
-import java.net.URI;
-import java.util.Map;
-import java.util.List;
-import java.util.Set;
-import javax.naming.Reference;
-import javax.management.ObjectName;
-import javax.xml.namespace.QName;
-
 import junit.framework.TestCase;
-import org.apache.geronimo.j2ee.deployment.RefContext;
+import org.apache.geronimo.common.DeploymentException;
+import org.apache.geronimo.deployment.DeploymentContext;
+import org.apache.geronimo.gbean.AbstractName;
+import org.apache.geronimo.gbean.AbstractNameQuery;
+import org.apache.geronimo.gbean.GBeanData;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
-import org.apache.geronimo.j2ee.deployment.NamingContext;
+import org.apache.geronimo.j2ee.deployment.Module;
+import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
-import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContext;
-import org.apache.geronimo.j2ee.j2eeobjectnames.J2eeContextImpl;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
-import org.apache.geronimo.gbean.GBeanData;
-import org.apache.geronimo.gbean.AbstractName;
-import org.apache.geronimo.gbean.AbstractNameQuery;
-import org.apache.geronimo.common.DeploymentException;
-import org.apache.geronimo.deployment.DeploymentContext;
-import org.apache.geronimo.deployment.GBeanDataRegistry;
-import org.apache.geronimo.kernel.Kernel;
-import org.apache.geronimo.kernel.GBeanNotFoundException;
+import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.Configuration;
+import org.apache.geronimo.kernel.config.ConfigurationModuleType;
+import org.apache.geronimo.kernel.config.ConfigurationResolver;
 import org.apache.geronimo.kernel.repository.Artifact;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
-import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
-import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
+import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.java.ComponentContextBuilder;
+import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
+import org.apache.geronimo.xbeans.j2ee.MessageDestinationRefType;
+import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
+
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import java.net.URI;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
 
 /**
  * @version $Rev$ $Date$
  */
 public class MessageDestinationTest extends TestCase {
-    private Kernel kernel = null;
-    private RefContext refContext =  new RefContext(new EJBReferenceBuilder() {
-            public Reference createEJBLocalReference(String objectName, GBeanData gbeanData, boolean isSession, String localHome, String local) throws DeploymentException {
-                return null;
-            }
-
-            public Reference createEJBRemoteReference(String objectName, GBeanData gbeanData, boolean isSession, String home, String remote) throws DeploymentException {
-                return null;
-            }
-
-            public Reference createCORBAReference(URI corbaURL, String objectName, AbstractName containerName, String home) throws DeploymentException {
-                return null;
-            }
-
-            public Object createHandleDelegateReference() throws DeploymentException {
-                return null;
-            }
-
-            public Reference getImplicitEJBRemoteRef(URI module, String refName, boolean isSession, String home, String remote, NamingContext context) throws DeploymentException {
-                return null;
-            }
-
-            public Reference getImplicitEJBLocalRef(URI module, String refName, boolean isSession, String localHome, String local, NamingContext context) throws DeploymentException {
-                return null;
-            }
-        }, new ResourceReferenceBuilder() {
-            public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
-                return null;
-            }
-
-            public Reference createAdminObjectRef(AbstractNameQuery containerId, Class iface, Configuration configuration) throws DeploymentException {
-                return null;
-            }
-
-            public GBeanData locateActivationSpecInfo(GBeanData resourceAdapterModuleData, String messageListenerInterface) throws DeploymentException {
-                return null;
-            }
-
-            public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) throws DeploymentException {
-                return null;
-            }
-
-            public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) throws DeploymentException {
-                return null;
-            }
-
-            public GBeanData locateConnectionFactoryInfo(GBeanData resourceAdapterModuleData, String connectionFactoryInterfaceName) throws DeploymentException {
-                return null;
-            }
-        }, new ServiceReferenceBuilder() {
-            //it could return a Service or a Reference, we don't care
-            public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) throws DeploymentException {
-                return null;
-            }
-        }, kernel
-
-                );
-    J2eeContext j2eeContext = new J2eeContextImpl("domain", "server", "app", NameFactory.JCA_RESOURCE, "module1", null, null);
-    NamingContext namingContext = new MockNamingContext(j2eeContext);
+    private RefContext refContext = new RefContext(new EJBReferenceBuilder() {
+
+        public Reference createCORBAReference(Configuration configuration, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) {
+            return null;
+        }
+
+        public Object createHandleDelegateReference() {
+            return null;
+        }
+
+        public Reference createEJBRemoteRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String home, String remote, Configuration configuration) {
+            return null;
+        }
+
+        public Reference createEJBLocalRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String localHome, String local, Configuration configuration) {
+            return null;
+        }
+
+    }, new ResourceReferenceBuilder() {
+        public Reference createResourceRef(AbstractNameQuery containerId, Class iface, Configuration configuration) {
+            return null;
+        }
+
+        public Reference createAdminObjectRef(AbstractNameQuery containerId, Class iface, Configuration configuration) {
+            return null;
+        }
+
+        public GBeanData locateActivationSpecInfo(AbstractNameQuery nameQuery, String messageListenerInterface, Configuration configuration) {
+            return null;
+        }
+
+        public GBeanData locateResourceAdapterGBeanData(GBeanData resourceAdapterModuleData) {
+            return null;
+        }
+
+        public GBeanData locateAdminObjectInfo(GBeanData resourceAdapterModuleData, String adminObjectInterfaceName) {
+            return null;
+        }
+
+        public GBeanData locateConnectionFactoryInfo(GBeanData resourceAdapterModuleData, String connectionFactoryInterfaceName) {
+            return null;
+        }
+    }, new ServiceReferenceBuilder() {
+        //it could return a Service or a Reference, we don't care
+        public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) {
+            return null;
+        }
+    }
+
+    );
+    Configuration configuration;
+    AbstractName baseName;
 
     ComponentContextBuilder builder = new ComponentContextBuilder();
 
+    protected void setUp() throws Exception {
+        Artifact id = new Artifact("test", "test", "", "car");
+        configuration = new Configuration(Collections.EMPTY_LIST,
+                ConfigurationModuleType.RAR,
+                new Environment(id),
+                Collections.EMPTY_LIST,
+                new byte[] {},
+                new ConfigurationResolver(id, null));
+        baseName = Naming.createRootName(configuration.getId(), "testRoot", NameFactory.RESOURCE_ADAPTER_MODULE);
+    }
+
     public void testMessageDestinations() throws Exception {
-        MessageDestinationType[] specdests = new MessageDestinationType[] {makeMD("d1"), makeMD("d2")};
-        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[] {makeGerMD("d1", "l1"), makeGerMD("d2", "l2")};
-        MessageDestinationRefType[] destRefs = new MessageDestinationRefType[] {makeMDR("n1", "d1"), makeMDR("n2", "d2")};
+        MessageDestinationType[] specdests = new MessageDestinationType[]{makeMD("d1"), makeMD("d2")};
+        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[]{makeGerMD("d1", "l1"), makeGerMD("d2", "l2")};
+        MessageDestinationRefType[] destRefs = new MessageDestinationRefType[]{makeMDR("n1", "d1"), makeMDR("n2", "d2")};
         ENCConfigBuilder.registerMessageDestinations(refContext, "module1", specdests, gerdests);
-        ObjectName n1 = NameFactory.getComponentName(null, null, null, null, null, "l1", NameFactory.JCA_ADMIN_OBJECT, j2eeContext);
-        ObjectName n2 = NameFactory.getComponentName(null, null, null, null, null, "l2", NameFactory.JCA_ADMIN_OBJECT, j2eeContext);
-        namingContext.addGBean(new GBeanData(n1, null));
-        namingContext.addGBean(new GBeanData(n2, null));
-        ENCConfigBuilder.addMessageDestinationRefs(refContext, namingContext, destRefs, this.getClass().getClassLoader(), builder);
+        AbstractName n1 = Naming.createChildName(baseName, NameFactory.JCA_ADMIN_OBJECT, "l1");
+        AbstractName n2 = Naming.createChildName(baseName, NameFactory.JCA_ADMIN_OBJECT, "l2");
+        configuration.addGBean(new GBeanData(n1, null));
+        configuration.addGBean(new GBeanData(n2, null));
+        ENCConfigBuilder.addMessageDestinationRefs(configuration, refContext, destRefs, this.getClass().getClassLoader(), builder);
         Map context = builder.getContext();
         assertEquals(2, context.size());
     }
 
     public void testMessageDestinationsWithModule() throws Exception {
-        MessageDestinationType[] specdests = new MessageDestinationType[] {makeMD("d1"), makeMD("d2")};
-        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[] {makeGerMD("d1", "module1", "l1"), makeGerMD("d2", "module1", "l2")};
-        MessageDestinationRefType[] destRefs = new MessageDestinationRefType[] {makeMDR("n1", "d1"), makeMDR("n2", "d2")};
+        MessageDestinationType[] specdests = new MessageDestinationType[]{makeMD("d1"), makeMD("d2")};
+        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[]{makeGerMD("d1", "module1", "l1"), makeGerMD("d2", "module1", "l2")};
+        MessageDestinationRefType[] destRefs = new MessageDestinationRefType[]{makeMDR("n1", "d1"), makeMDR("n2", "d2")};
         ENCConfigBuilder.registerMessageDestinations(refContext, "module1", specdests, gerdests);
-        ObjectName n1 = NameFactory.getComponentName(null, null, null, null, null, "l1", NameFactory.JCA_ADMIN_OBJECT, j2eeContext);
-        ObjectName n2 = NameFactory.getComponentName(null, null, null, null, null, "l2", NameFactory.JCA_ADMIN_OBJECT, j2eeContext);
-        namingContext.addGBean(new GBeanData(n1, null));
-        namingContext.addGBean(new GBeanData(n2, null));
-        ENCConfigBuilder.addMessageDestinationRefs(refContext, namingContext, destRefs, this.getClass().getClassLoader(), builder);
+        AbstractName n1 = Naming.createChildName(baseName, NameFactory.JCA_ADMIN_OBJECT, "l1");
+        AbstractName n2 = Naming.createChildName(baseName, NameFactory.JCA_ADMIN_OBJECT, "l2");
+        configuration.addGBean(new GBeanData(n1, null));
+        configuration.addGBean(new GBeanData(n2, null));
+        ENCConfigBuilder.addMessageDestinationRefs(configuration, refContext, destRefs, this.getClass().getClassLoader(), builder);
         Map context = builder.getContext();
         assertEquals(2, context.size());
     }
 
     public void testMessageDestinationsMatch() throws Exception {
-        MessageDestinationType[] specdests = new MessageDestinationType[] {makeMD("d1")};
-        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[] {makeGerMD("d1", "l1"), makeGerMD("d2", "l2")};
+        MessageDestinationType[] specdests = new MessageDestinationType[]{makeMD("d1")};
+        GerMessageDestinationType[] gerdests = new GerMessageDestinationType[]{makeGerMD("d1", "l1"), makeGerMD("d2", "l2")};
         try {
             ENCConfigBuilder.registerMessageDestinations(refContext, "module1", specdests, gerdests);
             fail("tried to register a GerMessageDestination witout a MessageDestination and it succeeded");
@@ -181,39 +181,5 @@
         d1.setAdminObjectModule(module);
         return d1;
     }
-    class MockNamingContext implements NamingContext {
-
-        private final GBeanDataRegistry gbeans = new GBeanDataRegistry();
-        private final J2eeContext j2eeContext;
-
-        public MockNamingContext(J2eeContext j2eeContext) {
-            this.j2eeContext = j2eeContext;
-        }
-
-        public AbstractName getModuleName() {
-            return j2eeContext;
-        }
-
-        public void addGBean(GBeanData gbean) {
-            gbeans.register(gbean);
-        }
-
-        public Set getGBeanNames() {
-            return gbeans.getGBeanNames();
-        }
-
-        public Set listGBeans(ObjectName pattern) {
-            return gbeans.listGBeans(pattern);
-        }
-
-        public GBeanData getGBeanInstance(ObjectName name) throws GBeanNotFoundException {
-            return gbeans.getGBeanInstance(name);
-        }
-
-        public Artifact getConfigID() {
-            return new Artifact("groupId", "MockNamingContextID", "1", "car");
-        }
-    }
-
 
 }

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=386000&r1=385999&r2=386000&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 Wed Mar 15 00:19:07 2006
@@ -31,6 +31,12 @@
 public class ResourceReference extends ConfigurationAwareReference {
     private final Class iface;
 
+    /**
+     *
+     * @param configId the configId of the configuration that holds the reference, not the resource adapter.
+     * @param abstractNameQuery query for name of the resource adapter.
+     * @param iface
+     */
     public ResourceReference(Artifact configId, AbstractNameQuery abstractNameQuery, Class iface) {
         super(configId, abstractNameQuery);
         this.iface = iface;

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=386000&r1=385999&r2=386000&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 Wed Mar 15 00:19:07 2006
@@ -92,7 +92,7 @@
 
 
 /**
- * @version $Rev: 385487 $ $Date$
+ * @version $Rev:385659 $ $Date$
  */
 public class TomcatModuleBuilder extends AbstractWebModuleBuilder {
 
@@ -318,7 +318,7 @@
             // unsharableResources, applicationManagedSecurityResources
             GBeanResourceEnvironmentBuilder rebuilder = new GBeanResourceEnvironmentBuilder(webModuleData);
             //N.B. use earContext not moduleContext
-            ENCConfigBuilder.setResourceEnvironment(earContext, webModule.getModuleURI(), rebuilder, webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray());
+            ENCConfigBuilder.setResourceEnvironment(webModule.getModuleURI(), rebuilder, webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray());
 
             webModuleData.setReferencePattern("TransactionContextManager", earContext.getTransactionContextManagerObjectName());
             webModuleData.setReferencePattern("TrackedConnectionAssociator", earContext.getConnectionTrackerObjectName());
@@ -455,7 +455,7 @@
 
     private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, TomcatWebAppType tomcatWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
         return ENCConfigBuilder.buildComponentContext(earContext,
-                earContext,
+                earContext.getConfiguration(),
                 webModule,
                 userTransaction,
                 webApp.getEnvEntryArray(),

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=386000&r1=385999&r2=386000&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 Wed Mar 15 00:19:07 2006
@@ -16,29 +16,6 @@
  */
 package org.apache.geronimo.tomcat.deployment;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.URL;
-import java.security.PermissionCollection;
-import java.security.Permissions;
-import java.util.Arrays;
-import java.util.Collection;
-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 javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.Reference;
-import javax.xml.namespace.QName;
-
 import junit.framework.TestCase;
 import org.apache.commons.io.FileUtils;
 import org.apache.geronimo.axis.builder.AxisBuilder;
@@ -46,15 +23,13 @@
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
 import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.util.UnpackedJarFile;
+import org.apache.geronimo.gbean.AbstractNameQuery;
 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.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.EJBReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.Module;
-import org.apache.geronimo.j2ee.deployment.NamingContext;
 import org.apache.geronimo.j2ee.deployment.RefContext;
 import org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
@@ -91,6 +66,29 @@
 import org.apache.geronimo.transaction.context.TransactionContextManagerGBean;
 import org.apache.geronimo.transaction.manager.TransactionManagerImplGBean;
 
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.naming.Reference;
+import javax.xml.namespace.QName;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URL;
+import java.security.PermissionCollection;
+import java.security.Permissions;
+import java.util.Arrays;
+import java.util.Collection;
+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$
  */
@@ -238,32 +236,19 @@
                 null,
                 new RefContext(new EJBReferenceBuilder() {
 
-                    public Reference createEJBLocalReference(String objectName,
-                                                             GBeanData gbeanData, boolean isSession, String localHome, String local)
-                            throws DeploymentException {
-                        return null;
-                    }
-
-                    public Reference createEJBRemoteReference(String objectName, GBeanData gbeanData, boolean isSession, String home,
-                                                              String remote) throws DeploymentException {
+                    public Reference createCORBAReference(Configuration configuration, AbstractNameQuery containerNameQuery, URI nsCorbaloc, String objectName, String home) throws DeploymentException {
                         return null;
                     }
 
-                    public Reference createCORBAReference(URI corbaURL,
-                                                          String objectName, AbstractName containerName,
-                                                          String home) throws DeploymentException {
+                    public Object createHandleDelegateReference() throws DeploymentException {
                         return null;
                     }
 
-                    public Object createHandleDelegateReference() {
+                    public Reference createEJBRemoteRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String home, String remote, Configuration configuration) throws DeploymentException {
                         return null;
                     }
 
-                    public Reference getImplicitEJBRemoteRef(URI module, String refName, boolean isSession, String home, String remote, NamingContext context) throws DeploymentException {
-                        return null;
-                    }
-
-                    public Reference getImplicitEJBLocalRef(URI module, String refName, boolean isSession, String localHome, String local, NamingContext context) throws DeploymentException {
+                    public Reference createEJBLocalRef(String requiredModule, String optionalModule, String name, Artifact targetConfigId, AbstractNameQuery query, boolean isSession, String localHome, String local, Configuration configuration) throws DeploymentException {
                         return null;
                     }
                 }, new ResourceReferenceBuilder() {
@@ -284,8 +269,8 @@
                     }
 
                     public GBeanData locateActivationSpecInfo(
-                            GBeanData resourceAdapterModuleData,
-                            String messageListenerInterface)
+                            AbstractNameQuery nameQuery,
+                            String messageListenerInterface, Configuration configuration)
                             throws DeploymentException {
                         return null;
                     }
@@ -314,7 +299,7 @@
                     public Object createService(Class serviceInterface, URI wsdlURI, URI jaxrpcMappingURI, QName serviceQName, Map portComponentRefMap, List handlerInfos, Object serviceRefType, DeploymentContext deploymentContext, Module module, ClassLoader classLoader) throws DeploymentException {
                         return null;
                     }
-                }, kernel));
+                }));
         return earContext;
     }
 



Mime
View raw message