geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r442387 [5/5] - in /geronimo/server/trunk: configs/axis-deployer/src/plan/ configs/client-deployer/src/plan/ configs/j2ee-deployer/src/plan/ configs/jetty-deployer/src/plan/ configs/openejb-deployer/src/plan/ configs/tomcat-deployer/src/pla...
Date Mon, 11 Sep 2006 23:51:36 GMT
Modified: geronimo/server/trunk/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java?view=diff&rev=442387&r1=442386&r2=442387
==============================================================================
--- geronimo/server/trunk/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java
(original)
+++ geronimo/server/trunk/modules/geronimo-service-builder/src/main/java/org/apache/geronimo/deployment/xmlbeans/XmlBeansUtil.java
Mon Sep 11 16:51:32 2006
@@ -154,8 +154,10 @@
 
     public static void unregisterSubstitutionGroupElements(QName substitutionGroup, QNameSet
substitutions) {
         QNameSet oldSubstitutions = (QNameSet) substitutionGroups.get(substitutionGroup);
-        QNameSet difference = oldSubstitutions.intersect(substitutions.inverse());
-        substitutionGroups.put(substitutionGroup, difference);
+        if (oldSubstitutions != null && substitutions != null) {
+            QNameSet difference = oldSubstitutions.intersect(substitutions.inverse());
+            substitutionGroups.put(substitutionGroup, difference);
+        }
     }
 
     public static QNameSet getQNameSetForSubstitutionGroup(QName substitutionGroup) {

Modified: geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?view=diff&rev=442387&r1=442386&r2=442387
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat-builder/src/main/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
Mon Sep 11 16:51:32 2006
@@ -54,10 +54,12 @@
 import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
 import org.apache.geronimo.j2ee.deployment.WebModule;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
 import org.apache.geronimo.kernel.config.ConfigurationData;
+import org.apache.geronimo.kernel.config.Configuration;
 import org.apache.geronimo.kernel.repository.Environment;
 import org.apache.geronimo.naming.deployment.ENCConfigBuilder;
 import org.apache.geronimo.naming.deployment.GBeanResourceEnvironmentBuilder;
@@ -74,11 +76,9 @@
 import org.apache.geronimo.web.deployment.AbstractWebModuleBuilder;
 import org.apache.geronimo.web.deployment.GenericToSpecificPlanConverter;
 import org.apache.geronimo.webservices.WebServiceContainer;
-import org.apache.geronimo.xbeans.geronimo.naming.GerMessageDestinationType;
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.TomcatWebAppDocument;
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.TomcatWebAppType;
 import org.apache.geronimo.xbeans.geronimo.web.tomcat.config.GerTomcatDocument;
-import org.apache.geronimo.xbeans.j2ee.MessageDestinationType;
 import org.apache.geronimo.xbeans.j2ee.ServletType;
 import org.apache.geronimo.xbeans.j2ee.WebAppDocument;
 import org.apache.geronimo.xbeans.j2ee.WebAppType;
@@ -104,8 +104,8 @@
             AbstractNameQuery tomcatContainerName,
             Collection webServiceBuilder,
             Collection securityBuilders,
-            Collection serviceBuilders, Kernel kernel) {
-        super(kernel, securityBuilders, serviceBuilders);
+            Collection serviceBuilders, NamingBuilder namingBuilders, Kernel kernel) {
+        super(kernel, securityBuilders, serviceBuilders, namingBuilders);
         this.defaultEnvironment = defaultEnvironment;
 
         this.tomcatContainerName = tomcatContainerName;
@@ -146,7 +146,7 @@
             // Output the target path in the error to make it clearer to the user which webapp
             // has the problem.  The targetPath is used, as moduleFile may have an unhelpful
             // value such as C:\geronimo-1.1\var\temp\geronimo-deploymentUtil22826.tmpdir
-            throw new DeploymentException("Error parsing web.xml for "+targetPath, xmle);
+            throw new DeploymentException("Error parsing web.xml for " + targetPath, xmle);
         }
         check(webApp);
 
@@ -165,9 +165,12 @@
 
         EnvironmentType environmentType = tomcatWebApp.getEnvironment();
         Environment environment = EnvironmentBuilder.buildEnvironment(environmentType, defaultEnvironment);
+
+        getNamingBuilders().buildEnvironment(webApp, tomcatWebApp, environment);
+
         // Note: logic elsewhere depends on the default artifact ID being the file name less
extension (ConfigIDExtractor)
         String warName = new File(moduleFile.getName()).getName();
-        if(warName.lastIndexOf('.') > -1) {
+        if (warName.lastIndexOf('.') > -1) {
             warName = warName.substring(0, warName.lastIndexOf('.'));
         }
         idBuilder.resolve(environment, warName, "war");
@@ -213,7 +216,7 @@
                             try {
                                 rawPlan = XmlBeansUtil.parse(path, getClass().getClassLoader());
                             } catch (FileNotFoundException e1) {
-                                log.warn("Web application "+ targetPath + " does not contain
a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on
whether you have things like resource references that need to be resolved.  You can also give
the deployer a separate deployment plan file on the command line.");
+                                log.warn("Web application " + targetPath + " does not contain
a WEB-INF/geronimo-web.xml deployment plan.  This may or may not be a problem, depending on
whether you have things like resource references that need to be resolved.  You can also give
the deployer a separate deployment plan file on the command line.");
                             }
                         }
                     }
@@ -234,7 +237,7 @@
             }
             return tomcatWebApp;
         } catch (XmlException e) {
-            throw new DeploymentException("xml problem for web app "+targetPath, e);
+            throw new DeploymentException("xml problem for web app " + targetPath, e);
         }
     }
 
@@ -247,12 +250,13 @@
 
     public void initContext(EARContext earContext, Module module, ClassLoader cl) throws
DeploymentException {
         WebAppType webApp = (WebAppType) module.getSpecDD();
-        MessageDestinationType[] messageDestinations = webApp.getMessageDestinationArray();
+//        MessageDestinationType[] messageDestinations = webApp.getMessageDestinationArray();
         TomcatWebAppType gerWebApp = (TomcatWebAppType) module.getVendorDD();
-        GerMessageDestinationType[] gerMessageDestinations = gerWebApp.getMessageDestinationArray();
+//        GerMessageDestinationType[] gerMessageDestinations = gerWebApp.getMessageDestinationArray();
 
-        ENCConfigBuilder.registerMessageDestinations(earContext.getRefContext(), module.getName(),
messageDestinations, gerMessageDestinations);
-        if((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length
> 0) &&
+//        ENCConfigBuilder.registerMessageDestinations(earContext, module.getName(), messageDestinations,
gerMessageDestinations);
+        getNamingBuilders().initContext(webApp, gerWebApp, module.getEarContext().getConfiguration(),
earContext.getConfiguration(), module);
+        if ((webApp.getSecurityConstraintArray().length > 0 || webApp.getSecurityRoleArray().length
> 0) &&
                 !gerWebApp.isSetSecurityRealmName()) {
             throw new DeploymentException("web.xml for web app " + module.getName() + " includes
security elements but Geronimo deployment plan is not provided or does not contain <security-realm-name>
element necessary to configure security accordingly.");
         }
@@ -272,7 +276,6 @@
 //        GbeanType[] gbeans = tomcatWebApp.getGbeanArray();
 //        ServiceConfigBuilder.addGBeans(gbeans, moduleClassLoader, moduleName, moduleContext);
 
-
         //this may add to the web classpath with enhanced classes.
         //N.B. we use the ear context which has all the gbeans we could possibly be looking
up from this ear.
         Map compContext = buildComponentContext(earContext, webModule, webApp, tomcatWebApp,
moduleClassLoader);
@@ -302,8 +305,8 @@
             //N.B. use earContext not moduleContext
             ENCConfigBuilder.setResourceEnvironment(rebuilder, webApp.getResourceRefArray(),
tomcatWebApp.getResourceRefArray());
 
-            webModuleData.setReferencePattern("TransactionManager", earContext.getTransactionManagerObjectName());
-            webModuleData.setReferencePattern("TrackedConnectionAssociator", earContext.getConnectionTrackerObjectName());
+            webModuleData.setReferencePattern("TransactionManager", earContext.getTransactionManagerName());
+            webModuleData.setReferencePattern("TrackedConnectionAssociator", earContext.getConnectionTrackerName());
 
             if (tomcatWebApp.isSetWebContainer()) {
                 AbstractNameQuery webContainerName = ENCConfigBuilder.getGBeanQuery(NameFactory.GERONIMO_SERVICE,
tomcatWebApp.getWebContainer());
@@ -335,7 +338,7 @@
 
             if (tomcatWebApp.isSetCluster()) {
                 String cluster = tomcatWebApp.getCluster().trim();
-                AbstractName clusterName =earContext.getNaming().createChildName(moduleName,
cluster, CatalinaClusterGBean.J2EE_TYPE);
+                AbstractName clusterName = earContext.getNaming().createChildName(moduleName,
cluster, CatalinaClusterGBean.J2EE_TYPE);
                 webModuleData.setReferencePattern("Cluster", clusterName);
             }
 
@@ -365,7 +368,7 @@
                         String servletClassName = servletType.getServletClass().getStringValue().trim();
                         Object portInfo = portMap.get(servletName);
                         if (portInfo == null) {
-                            throw new DeploymentException("No web service deployment info
for servlet name " + servletName +" in web app "+module.getName());
+                            throw new DeploymentException("No web service deployment info
for servlet name " + servletName + " in web app " + module.getName());
                         }
 
                         WebServiceContainer wsContainer = configurePOJO(webModule.getModuleFile(),
portInfo, servletClassName, moduleClassLoader);
@@ -381,7 +384,7 @@
 
             if (tomcatWebApp.isSetSecurityRealmName()) {
                 if (earContext.getSecurityConfiguration() == null) {
-                     throw new DeploymentException("You have specified a <security-realm-name>
for the webapp " + moduleName + " but no <security> configuration (role mapping) is
supplied in the Geronimo plan for the web application (or the Geronimo plan for the EAR if
the web app is in an EAR)");
+                    throw new DeploymentException("You have specified a <security-realm-name>
for the webapp " + moduleName + " but no <security> configuration (role mapping) is
supplied in the Geronimo plan for the web application (or the Geronimo plan for the EAR if
the web app is in an EAR)");
                 }
 
                 SecurityHolder securityHolder = new SecurityHolder();
@@ -405,7 +408,7 @@
                 }
                 securityHolder.setChecked(checkedPermissions);
                 earContext.addSecurityContext(policyContextID, componentPermissions);
-                DefaultPrincipal defaultPrincipal = ((SecurityConfiguration)earContext.getSecurityConfiguration()).getDefaultPrincipal();
+                DefaultPrincipal defaultPrincipal = ((SecurityConfiguration) earContext.getSecurityConfiguration()).getDefaultPrincipal();
                 securityHolder.setDefaultPrincipal(defaultPrincipal);
                 if (defaultPrincipal != null) {
                     securityHolder.setSecurity(true);
@@ -423,7 +426,7 @@
         } catch (DeploymentException de) {
             throw de;
         } catch (Exception e) {
-            throw new DeploymentException("Unable to initialize GBean for web app "+module.getName(),
e);
+            throw new DeploymentException("Unable to initialize GBean for web app " + module.getName(),
e);
         }
     }
 
@@ -443,20 +446,12 @@
 
 
     private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType
webApp, TomcatWebAppType tomcatWebApp, ClassLoader cl) throws DeploymentException {
-        return ENCConfigBuilder.buildComponentContext(earContext,
-                earContext.getConfiguration(),
-                webModule,
-                null,
-                webApp.getEnvEntryArray(),
-                webApp.getEjbRefArray(), tomcatWebApp.getEjbRefArray(),
-                webApp.getEjbLocalRefArray(), tomcatWebApp.getEjbLocalRefArray(),
-                webApp.getResourceRefArray(), tomcatWebApp.getResourceRefArray(),
-                webApp.getResourceEnvRefArray(), tomcatWebApp.getResourceEnvRefArray(),
-                webApp.getMessageDestinationRefArray(),
-                webApp.getServiceRefArray(), tomcatWebApp.getServiceRefArray(),
-                tomcatWebApp.getGbeanRefArray(),
-                cl);
+        Map componentContext = new HashMap();
+        Configuration earConfiguration = earContext.getConfiguration();
+        getNamingBuilders().buildNaming(webApp, tomcatWebApp, earConfiguration, earConfiguration,
webModule, componentContext);
+        return componentContext;
     }
+
     public static final GBeanInfo GBEAN_INFO;
 
     static {
@@ -466,16 +461,18 @@
         infoBuilder.addReference("WebServiceBuilder", WebServiceBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addReference("SecurityBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addReference("ServiceBuilders", NamespaceDrivenBuilder.class, NameFactory.MODULE_BUILDER);
+        infoBuilder.addReference("NamingBuilders", NamingBuilder.class, NameFactory.MODULE_BUILDER);
         infoBuilder.addAttribute("kernel", Kernel.class, false);
         infoBuilder.addInterface(ModuleBuilder.class);
 
         infoBuilder.setConstructor(new String[]{
-            "defaultEnvironment",
-            "tomcatContainerName",
-            "WebServiceBuilder",
-            "SecurityBuilders",
-            "ServiceBuilders",
-            "kernel"});
+                "defaultEnvironment",
+                "tomcatContainerName",
+                "WebServiceBuilder",
+                "SecurityBuilders",
+                "ServiceBuilders",
+                "NamingBuilders",
+                "kernel"});
         GBEAN_INFO = infoBuilder.getBeanInfo();
     }
 

Modified: geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java?view=diff&rev=442387&r1=442386&r2=442387
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
Mon Sep 11 16:51:32 2006
@@ -8,11 +8,11 @@
 import org.apache.geronimo.deployment.xbeans.ArtifactType;
 import org.apache.geronimo.deployment.xbeans.EnvironmentType;
 import org.apache.geronimo.deployment.xmlbeans.XmlBeansUtil;
-import org.apache.geronimo.deployment.service.ServiceConfigBuilder;
 import org.apache.geronimo.deployment.service.GBeanBuilder;
 import org.apache.geronimo.gbean.AbstractName;
 import org.apache.geronimo.gbean.AbstractNameQuery;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Jsr77Naming;
 import org.apache.geronimo.kernel.Naming;
@@ -38,7 +38,7 @@
     private TomcatModuleBuilder builder;
 
     protected void setUp() throws Exception {
-        builder = new TomcatModuleBuilder(defaultEnvironment, tomcatContainerObjectName,
Collections.singleton(webServiceBuilder), Collections.singleton(new GeronimoSecurityBuilderImpl()),
Collections.singleton(new GBeanBuilder(null, null)), null);
+        builder = new TomcatModuleBuilder(defaultEnvironment, tomcatContainerObjectName,
Collections.singleton(webServiceBuilder), Collections.singleton(new GeronimoSecurityBuilderImpl()),
Collections.singleton(new GBeanBuilder(null, null)), new NamingBuilderCollection(null, null),
null);
     }
 
     public void testResourceRef() throws Exception {

Modified: geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java?view=diff&rev=442387&r1=442386&r2=442387
==============================================================================
--- geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
(original)
+++ geronimo/server/trunk/modules/geronimo-tomcat-builder/src/test/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilderTest.java
Mon Sep 11 16:51:32 2006
@@ -19,7 +19,6 @@
 import java.io.File;
 import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URI;
 import java.net.URL;
 import java.security.PermissionCollection;
 import java.security.Permissions;
@@ -27,20 +26,14 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.management.ObjectName;
-import javax.naming.Reference;
-import javax.xml.namespace.QName;
-
 import org.apache.geronimo.testsupport.TestSupport;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.geronimo.common.DeploymentException;
 import org.apache.geronimo.connector.outbound.connectiontracking.ConnectionTrackingCoordinatorGBean;
-import org.apache.geronimo.deployment.DeploymentContext;
 import org.apache.geronimo.deployment.ModuleIDBuilder;
 import org.apache.geronimo.deployment.service.GBeanBuilder;
 import org.apache.geronimo.deployment.util.UnpackedJarFile;
@@ -50,13 +43,10 @@
 import org.apache.geronimo.gbean.GBeanInfo;
 import org.apache.geronimo.gbean.GBeanInfoBuilder;
 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.RefContext;
-import org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder;
-import org.apache.geronimo.j2ee.deployment.ServiceReferenceBuilder;
 import org.apache.geronimo.j2ee.deployment.UnavailableWebServiceBuilder;
 import org.apache.geronimo.j2ee.deployment.WebServiceBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilderCollection;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.j2ee.management.impl.J2EEServerImpl;
 import org.apache.geronimo.kernel.Jsr77Naming;
@@ -166,6 +156,7 @@
         earContext.addGBean(jaccBeanData);
         earContext.setJaccManagerName(jaccBeanName);
         module.setEarContext(earContext);
+        module.setRootEarContext(earContext);
         builder.initContext(earContext, module, cl);
         builder.addGBeans(earContext, module, cl, null);
         ConfigurationData configurationData = earContext.getConfigurationData();
@@ -202,59 +193,8 @@
                 new AbstractNameQuery(ctcName),
                 null,
                 null,
-                null,
-                new RefContext(new EJBReferenceBuilder() {
-
-
-                    public Reference createCORBAReference(Configuration configuration, AbstractNameQuery
containerNameQuery, URI nsCorbaloc, String objectName, String home) {
-                        return null;
-                    }
-
-                    public Reference createEJBRemoteRef(String refName, Configuration configuration,
String name, String requiredModule, String optionalModule, Artifact targetConfigId, AbstractNameQuery
query, boolean isSession, String home, String remote) {
-                        return null;
-                    }
-
-                    public Reference createEJBLocalRef(String refName, Configuration configuration,
String name, String requiredModule, String optionalModule, Artifact targetConfigId, AbstractNameQuery
query, boolean isSession, String localHome, String local) {
-                        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 ObjectName locateResourceName(ObjectName query) {
-                                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;
-                            }
-                        }));
+                null
+        );
     }
 
     private void recursiveDelete(File path) {
@@ -376,7 +316,7 @@
 
         defaultEnvironment.addDependency(baseId, ImportType.ALL);
         defaultEnvironment.setConfigId(webModuleArtifact);
-        builder = new TomcatModuleBuilder(defaultEnvironment, new AbstractNameQuery(containerName),
Collections.singleton(webServiceBuilder), Collections.singleton(new GeronimoSecurityBuilderImpl()),
Collections.singleton(new GBeanBuilder(null, null)), null);
+        builder = new TomcatModuleBuilder(defaultEnvironment, new AbstractNameQuery(containerName),
Collections.singleton(webServiceBuilder), Collections.singleton(new GeronimoSecurityBuilderImpl()),
Collections.singleton(new GBeanBuilder(null, null)), new NamingBuilderCollection(null, null),
null);
     }
 
     protected void tearDown() throws Exception {

Modified: geronimo/server/trunk/modules/geronimo-web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java?view=diff&rev=442387&r1=442386&r2=442387
==============================================================================
--- geronimo/server/trunk/modules/geronimo-web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
(original)
+++ geronimo/server/trunk/modules/geronimo-web-builder/src/main/java/org/apache/geronimo/web/deployment/AbstractWebModuleBuilder.java
Mon Sep 11 16:51:32 2006
@@ -54,6 +54,7 @@
 import org.apache.geronimo.j2ee.deployment.EARContext;
 import org.apache.geronimo.j2ee.deployment.Module;
 import org.apache.geronimo.j2ee.deployment.ModuleBuilder;
+import org.apache.geronimo.j2ee.deployment.NamingBuilder;
 import org.apache.geronimo.j2ee.j2eeobjectnames.NameFactory;
 import org.apache.geronimo.kernel.Kernel;
 import org.apache.geronimo.kernel.Naming;
@@ -93,6 +94,9 @@
     protected final Kernel kernel;
     protected final NamespaceDrivenBuilderCollection securityBuilders;
     protected final NamespaceDrivenBuilderCollection serviceBuilders;
+
+    protected final NamingBuilder namingBuilders;
+
     private static final QName SECURITY_QNAME = GerSecurityDocument.type.getDocumentElementName();
     private static final QName SERVICE_QNAME = ServiceDocument.type.getDocumentElementName();
 
@@ -103,10 +107,11 @@
      */
     private static final URI RELATIVE_MODULE_BASE_URI = URI.create("../");
 
-    protected AbstractWebModuleBuilder(Kernel kernel, Collection securityBuilders, Collection
serviceBuilders) {
+    protected AbstractWebModuleBuilder(Kernel kernel, Collection securityBuilders, Collection
serviceBuilders, NamingBuilder namingBuilders) {
         this.kernel = kernel;
         this.securityBuilders = new NamespaceDrivenBuilderCollection(securityBuilders);
         this.serviceBuilders = new NamespaceDrivenBuilderCollection(serviceBuilders);
+        this.namingBuilders = namingBuilders;
 
     }
 
@@ -119,6 +124,10 @@
 
     }
 
+    public NamingBuilder getNamingBuilders() {
+        return namingBuilders;
+    }
+
     //TODO configid these need to be converted to ReferencePatterns
     protected Set findGBeanDependencies(EARContext earContext) {
         Set dependencies = new HashSet();
@@ -222,6 +231,7 @@
             }
         }
         module.setEarContext(moduleContext);
+        module.setRootEarContext(earContext);
 
         try {
             // add the warfile's content to the configuration



Mime
View raw message