geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ammul...@apache.org
Subject svn commit: r208876 - in /geronimo/trunk/modules/web-builder: ./ src/ src/java/ src/java/org/ src/java/org/apache/ src/java/org/apache/geronimo/ src/java/org/apache/geronimo/web/ src/java/org/apache/geronimo/web/deployment/ src/schema/ src/test-resourc...
Date Sun, 03 Jul 2005 02:21:58 GMT
Author: ammulder
Date: Sat Jul  2 19:21:55 2005
New Revision: 208876

URL: http://svn.apache.org/viewcvs?rev=208876&view=rev
Log:
Add new common Tomcat/Jetty builder module

Added:
    geronimo/trunk/modules/web-builder/
    geronimo/trunk/modules/web-builder/maven.xml
    geronimo/trunk/modules/web-builder/project.properties
    geronimo/trunk/modules/web-builder/project.xml
    geronimo/trunk/modules/web-builder/src/
    geronimo/trunk/modules/web-builder/src/java/
    geronimo/trunk/modules/web-builder/src/java/org/
    geronimo/trunk/modules/web-builder/src/java/org/apache/
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfiguration.java
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfigurer.java
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java
    geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java
    geronimo/trunk/modules/web-builder/src/schema/
    geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd
    geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml
    geronimo/trunk/modules/web-builder/src/test/
    geronimo/trunk/modules/web-builder/src/test-resources/
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/web.xml
    geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/hello.txt
    geronimo/trunk/modules/web-builder/src/test/org/
    geronimo/trunk/modules/web-builder/src/test/org/apache/
    geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/
    geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/
    geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/
    geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java

Added: geronimo/trunk/modules/web-builder/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/maven.xml?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/maven.xml (added)
+++ geronimo/trunk/modules/web-builder/maven.xml Sat Jul  2 19:21:55 2005
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  
+
+<!-- $Rev: 56771 $ $Date: 2004-11-06 12:58:54 -0700 (Sat, 06 Nov 2004) $ -->
+
+<project default="default"
+    xmlns:j="jelly:core"
+    xmlns:ant="jelly:ant"
+    xmlns:maven="jelly:maven"
+    xmlns:xmlbeans="geronimo:xmlbeans">
+
+    <preGoal name="java:compile">
+        <xmlbeans:schema2java
+            sourcedir="${basedir}/src"
+            sourceschema="schema/geronimo-web.xsd"
+            xmlconfigs="${basedir}/src/schema/xmlconfig.xml"
+            targetdir="${basedir}/target/xmlbeans"
+            cataloglocation="${basedir}/../j2ee-schema/src/catalog/resolver-catalog.xml"/>
+    </preGoal>
+
+</project>

Added: geronimo/trunk/modules/web-builder/project.properties
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/project.properties?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/project.properties (added)
+++ geronimo/trunk/modules/web-builder/project.properties Sat Jul  2 19:21:55 2005
@@ -0,0 +1,11 @@
+##
+## $Rev: 151530 $ $Date: 2005-02-05 16:47:24 -0700 (Sat, 05 Feb 2005) $
+##
+
+maven.junit.jvmargs=-ea
+maven.junit.fork=true
+
+# Include the generated xmlbean classes in the eclipse classpath
+maven.eclipse.classpath.include=target/xmlbeans
+
+maven.idea.generated.source=xmlbeans

Added: geronimo/trunk/modules/web-builder/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/project.xml?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/project.xml (added)
+++ geronimo/trunk/modules/web-builder/project.xml Sat Jul  2 19:21:55 2005
@@ -0,0 +1,398 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<!-- $Rev: 160134 $ $Date: 2005-04-05 00:20:16 -0600 (Tue, 05 Apr 2005) $ -->
+
+<project>
+    <pomVersion>3</pomVersion>
+    <extend>../../etc/project.xml</extend>
+
+    <!-- ===================== -->
+    <!-- Module Identification -->
+    <!-- ===================== -->
+
+    <name>Geronimo :: Web :: Builder</name>
+    <id>geronimo-web-builder</id>
+    <shortDescription>Generic Web Container Deployer</shortDescription>
+    <description>Geronimo Web Container Deployer</description>
+    <url>http://geronimo.apache.org/modules/web-builder/</url>
+    <siteDirectory>/www/geronimo.apache.org/modules/web-builder</siteDirectory>
+    <distributionDirectory>/www/incubator.apache.org/projects/geronimo/builds/web-builder</distributionDirectory>
+
+    <package>org.apache.geronimo.web</package>
+
+    <!-- ============ -->
+    <!-- Dependencies -->
+    <!-- ============ -->
+
+    <dependencies>
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-xmlbeans-plugin</artifactId>
+            <version>${pom.currentVersion}</version>
+            <type>plugin</type>
+        </dependency>
+
+        <!-- needed for xmlbeans runtime-->
+        <dependency>
+            <groupId>xmlbeans</groupId>
+            <artifactId>xbean-apache</artifactId>
+            <version>${xmlbeans_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-deploy-config</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-j2ee-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-security-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-service-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-naming-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee-deployment</artifactId>
+            <version>${geronimo_spec_j2ee_deployment_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-j2ee-schema</artifactId>
+            <version>${pom.currentVersion}</version>
+            <properties>
+                <xmlbeans>true</xmlbeans>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-test-ddbean</artifactId>
+            <version>${geronimo_version}</version>
+        </dependency>
+
+<!--
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-axis</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-kernel</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-deployment</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-naming</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+       <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-tomcat</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+       <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-j2ee</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-security</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-transaction</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-connector</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-common</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-system</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-service-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-webservices</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        todo put WSDescriptorParser somewhere else and remove this dependency
+        <dependency>
+            <groupId>geronimo</groupId>
+            <artifactId>geronimo-axis-builder</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-jta</artifactId>
+            <version>${geronimo_spec_jta_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee-jacc</artifactId>
+            <version>${geronimo_spec_j2ee_jacc_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-j2ee-connector</artifactId>
+            <version>${geronimo_spec_j2ee_connector_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>mx4j</groupId>
+            <artifactId>mx4j</artifactId>
+            <version>${mx4j_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-servlet</artifactId>
+            <version>${geronimo_spec_servlet_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-jsp</artifactId>
+            <version>${geronimo_spec_jsp_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-jaxrpc</artifactId>
+            <version>${geronimo_spec_jaxrpc_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>geronimo-spec</groupId>
+            <artifactId>geronimo-spec-saaj</artifactId>
+            <version>${geronimo_spec_saaj_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>axis</groupId>
+            <artifactId>axis</artifactId>
+            <version>${axis_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-discovery</groupId>
+            <artifactId>commons-discovery</artifactId>
+            <version>${commons_discovery_version}</version>
+            <url>http://jakarta.apache.org/commons/discovery/</url>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+            <version>${commons_logging_version}</version>
+            <url>http://jakarta.apache.org/commons/logging/</url>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-modeler</groupId>
+            <artifactId>commons-modeler</artifactId>
+            <version>${commons_modeler_version}</version>
+            <url>http://jakarta.apache.org/commons/modeler</url>
+            <properties>
+                <repository>true</repository>
+            </properties>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-el</groupId>
+            <artifactId>commons-el</artifactId>
+            <version>${commons_el_version}</version>
+            <url>http://jakarta.apache.org/commons/el/</url>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons_io_version}</version>
+            <url>http://jakarta.apache.org/commons/io/</url>
+        </dependency>
+
+        <dependency>
+            <groupId>ant</groupId>
+            <artifactId>ant</artifactId>
+            <version>${ant_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>${xerces_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cglib</groupId>
+            <artifactId>cglib-nodep</artifactId>
+            <version>${cglib_version}</version>
+            <url>http://cglib.sf.net/</url>
+        </dependency>
+
+        <dependency>
+            <groupId>concurrent</groupId>
+            <artifactId>concurrent</artifactId>
+            <version>${concurrent_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>regexp</groupId>
+            <artifactId>regexp</artifactId>
+            <version>${regexp_version}</version>
+            <url>http://jakarta.apache.org/regexp</url>
+        </dependency>
+
+        <dependency>
+            <groupId>tranql</groupId>
+            <artifactId>tranql</artifactId>
+            <version>${tranql_version}</version>
+            <url>http://tranql.codehaus.org</url>
+        </dependency>
+
+        <dependency>
+            <groupId>wsdl4j</groupId>
+            <artifactId>wsdl4j</artifactId>
+            <version>${wsdl4j_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xercesImpl</artifactId>
+            <version>${xerces_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xerces</groupId>
+            <artifactId>xmlParserAPIs</artifactId>
+            <version>${xml_parser_apis_version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>xml-apis</groupId>
+            <artifactId>xml-apis</artifactId>
+            <version>${xml_apis_version}</version>
+        </dependency>
+-->
+    </dependencies>
+
+
+    <!-- =================== -->
+    <!-- Build Specification -->
+    <!-- =================== -->
+
+    <build>
+        <resources>
+            <resource>
+                <directory>${basedir}/src/etc</directory>
+            </resource>
+            <resource>
+                <directory>${basedir}/target/xmlbeans</directory>
+                <includes>
+                     <include>schema/**</include>
+                 </includes>
+             </resource>
+        </resources>
+        <unitTest>
+            <includes>
+                <include>**/*Test.java</include>
+            </includes>
+            <excludes>
+                <exclude>**/Abstract*.java</exclude>
+            </excludes>
+            <resources>
+                <resource>
+                    <directory>${basedir}/src/schema</directory>
+                    <includes>
+                        <include>*.xsd</include>
+                    </includes>
+                </resource>
+                <resource>
+                    <directory>${basedir}/src/test-resources</directory>
+                </resource>
+            </resources>
+        </unitTest>
+    </build>
+</project>

Added: geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfiguration.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfiguration.java?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfiguration.java (added)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfiguration.java Sat Jul  2 19:21:55 2005
@@ -0,0 +1,31 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.web.deployment;
+
+import javax.enterprise.deploy.model.DeployableObject;
+
+import org.apache.geronimo.deployment.plugin.DeploymentConfigurationSupport;
+
+/**
+ * @version $Rev: 56771 $ $Date: 2004-11-06 12:58:54 -0700 (Sat, 06 Nov 2004) $
+ */
+public class WARConfiguration extends DeploymentConfigurationSupport {
+    public WARConfiguration(DeployableObject deployable) {
+        super(deployable, new WebAppDConfigRoot(deployable.getDDBeanRoot()));
+    }
+}

Added: geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfigurer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfigurer.java?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfigurer.java (added)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WARConfigurer.java Sat Jul  2 19:21:55 2005
@@ -0,0 +1,37 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.web.deployment;
+
+import javax.enterprise.deploy.model.DeployableObject;
+import javax.enterprise.deploy.shared.ModuleType;
+import javax.enterprise.deploy.spi.DeploymentConfiguration;
+
+import org.apache.geronimo.deployment.ModuleConfigurer;
+
+/**
+ * @version $Rev: 126313 $ $Date: 2005-01-24 14:03:52 -0700 (Mon, 24 Jan 2005) $
+ */
+public class WARConfigurer implements ModuleConfigurer {
+    public DeploymentConfiguration createConfiguration(DeployableObject deployable) {
+        if (ModuleType.WAR.equals(deployable.getType())) {
+            return new WARConfiguration(deployable);
+        } else {
+            return null;
+        }
+    }
+}

Added: geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java (added)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java Sat Jul  2 19:21:55 2005
@@ -0,0 +1,101 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.web.deployment;
+
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.spi.DConfigBean;
+import javax.enterprise.deploy.spi.exceptions.BeanNotFoundException;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+
+import org.apache.geronimo.deployment.plugin.DConfigBeanSupport;
+import org.apache.geronimo.naming.deployment.ENCHelper;
+import org.apache.geronimo.xbeans.geronimo.web.WebAppType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+
+/**
+ * @version $Rev: 56771 $ $Date: 2004-11-06 12:58:54 -0700 (Sat, 06 Nov 2004) $
+ */
+public class WebAppDConfigBean extends DConfigBeanSupport {
+    private final ENCHelper encHelper;
+
+    WebAppDConfigBean(DDBean ddBean, WebAppType webApp) {
+        super(ddBean, webApp);
+
+        ENCHelper.XmlEnvRefs envRefs = new ENCHelper.XmlEnvRefs(webApp.getEjbRefArray(), webApp.getEjbLocalRefArray(), webApp.getResourceRefArray(), webApp.getResourceEnvRefArray()); 
+
+        //which version are we dealing with?
+        String version = ddBean.getRoot().getAttributeValue("version");
+        if ("2.4".equals(version)) {
+            encHelper = new ENCHelper(ddBean, envRefs, getXPathsForJ2ee_1_4(ENCHelper.ENC_XPATHS), getXPathsForJ2ee_1_4(ENCHelper.NAME_XPATHS));
+        } else {
+            encHelper = new ENCHelper(ddBean, envRefs, getXPathsWithPrefix(null, ENCHelper.ENC_XPATHS), getXPathsWithPrefix(null, ENCHelper.NAME_XPATHS));
+        }
+
+    }
+
+    WebAppType getWebApp() {
+        return (WebAppType) getXmlObject();
+    }
+
+    public String getContextRoot() {
+        return getWebApp().getContextRoot();
+    }
+
+    public void setContextRoot(String contextRoot) {
+        pcs.firePropertyChange("contextRoot", getContextRoot(), contextRoot);
+        getWebApp().setContextRoot(contextRoot);
+    }
+
+    /**
+     * getContextPriorityClassLoader.
+     *
+     * @return True if this context should give web application class in preference over the containers
+     *         classes, as per the servlet specification recommendations.
+     */
+    public boolean getContextPriorityClassLoader() {
+        return getWebApp().getContextPriorityClassloader();
+    }
+
+    /**
+     * setContextPriorityClassLoader.
+     *
+     * @param contextPriority True if this context should give web application class in preference over the containers
+     * classes, as per the servlet specification recommendations.
+     */
+    public void setContextPriorityClassLoader(boolean contextPriority) {
+        pcs.firePropertyChange("contextPriorityClassLoader", getContextPriorityClassLoader(), contextPriority);
+        getWebApp().setContextPriorityClassloader(contextPriority);
+    }
+
+    public DConfigBean getDConfigBean(DDBean ddBean) throws ConfigurationException {
+        return encHelper.getDConfigBean(ddBean);
+    }
+
+    public void removeDConfigBean(DConfigBean dcBean) throws BeanNotFoundException {
+        encHelper.removeDConfigBean(dcBean);
+    }
+
+    public String[] getXpaths() {
+        return getXPathsForJ2ee_1_4(ENCHelper.ENC_XPATHS);
+    }
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return WebAppDConfigRoot.SCHEMA_TYPE_LOADER;
+    }
+
+}

Added: geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java (added)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java Sat Jul  2 19:21:55 2005
@@ -0,0 +1,85 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.web.deployment;
+
+import java.io.IOException;
+import java.io.InputStream;
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.spi.DConfigBean;
+import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
+
+import org.apache.geronimo.deployment.plugin.DConfigBeanRootSupport;
+import org.apache.geronimo.xbeans.geronimo.web.WebAppDocument;
+import org.apache.geronimo.xbeans.geronimo.web.WebAppType;
+import org.apache.xmlbeans.SchemaTypeLoader;
+import org.apache.xmlbeans.XmlBeans;
+import org.apache.xmlbeans.XmlException;
+
+/**
+ * @version $Rev: 56771 $ $Date: 2004-11-06 12:58:54 -0700 (Sat, 06 Nov 2004) $
+ */
+public class WebAppDConfigRoot extends DConfigBeanRootSupport {
+    static final SchemaTypeLoader SCHEMA_TYPE_LOADER = XmlBeans.typeLoaderUnion(new SchemaTypeLoader[]{
+        XmlBeans.typeLoaderForClassLoader(org.apache.geronimo.xbeans.j2ee.String.class.getClassLoader()),
+        XmlBeans.typeLoaderForClassLoader(WebAppDocument.class.getClassLoader())
+    });
+
+    private static String[] XPATHS = {
+        "web-app"
+    };
+
+    private WebAppDConfigBean webAppBean;
+
+    public WebAppDConfigRoot(DDBeanRoot ddBean) {
+        super(ddBean, WebAppDocument.Factory.newInstance());
+        WebAppType webApp = getWebAppDocument().addNewWebApp();
+        replaceWebAppDConfigBean(webApp);
+    }
+
+    private void replaceWebAppDConfigBean(WebAppType webApp) {
+        DDBean ddBean = getDDBean();
+        webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
+    }
+
+    WebAppDocument getWebAppDocument() {
+        return (WebAppDocument) getXmlObject();
+    }
+
+    public String[] getXpaths() {
+        return XPATHS;
+    }
+
+    public DConfigBean getDConfigBean(DDBean bean) throws ConfigurationException {
+        if (XPATHS[0].equals(bean.getXpath())) {
+            return webAppBean;
+        }
+        return null;
+    }
+
+    public void fromXML(InputStream inputStream) throws XmlException, IOException {
+        super.fromXML(inputStream);
+        replaceWebAppDConfigBean(getWebAppDocument().getWebApp());
+    }
+
+    protected SchemaTypeLoader getSchemaTypeLoader() {
+        return SCHEMA_TYPE_LOADER;
+    }
+
+
+}

Added: geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd (added)
+++ geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd Sat Jul  2 19:21:55 2005
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<xs:schema
+    xmlns:web="http://geronimo.apache.org/xml/ns/web"
+    targetNamespace="http://geronimo.apache.org/xml/ns/web"
+    xmlns:naming="http://geronimo.apache.org/xml/ns/naming"
+    xmlns:security="http://geronimo.apache.org/xml/ns/security"
+    xmlns:sys="http://geronimo.apache.org/xml/ns/deployment"
+    xmlns:xs="http://www.w3.org/2001/XMLSchema"
+    elementFormDefault="qualified"
+    attributeFormDefault="unqualified"
+    version="1.0">
+
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/naming" schemaLocation="../../../naming-builder/src/schema/geronimo-naming.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/security" schemaLocation="../../../security-builder/src/schema/geronimo-security.xsd"/>
+    <xs:import namespace="http://geronimo.apache.org/xml/ns/deployment" schemaLocation="../../../service-builder/src/schema/geronimo-config.xsd"/>
+
+    <xs:element name="web-app" type="web:web-appType"/>
+
+    <xs:complexType name="config-paramType">
+        <xs:annotation>
+            <xs:documentation>
+                The config-paramType contains a name-value pair for a
+                configuration parameter
+            </xs:documentation>
+        </xs:annotation>
+        <xs:simpleContent>
+            <xs:extension base="xs:string">
+                <xs:attribute name="name" type="xs:string"/>
+            </xs:extension>
+        </xs:simpleContent>
+    </xs:complexType>
+
+    <xs:complexType name="container-configType">
+        <xs:annotation>
+            <xs:documentation>
+		Holds any configuration settings appropriate to the
+                specific web container this application is targeting.
+                Generally speaking this configuration file reflects
+                the commonalities between web containers, and it's
+                possible for a single container to have additional
+                configuration options.  We recommend these be avoided
+                wherever possible for the sake of portability.
+
+                Some known parameters are:
+                  Tomcat  virtual-server
+                  Tomcat  tomcat-realm
+                  Tomcat  tomcat-valve-chain
+                An authoritative list is left to the individual container
+                documentation.
+            </xs:documentation>
+        </xs:annotation>
+      <xs:sequence>
+        <xs:element name="config-param" type="web:config-paramType" minOccurs="0" maxOccurs="unbounded" />
+      </xs:sequence>
+      <xs:attribute name="container" type="web:web-containerType" use="required" />
+    </xs:complexType>
+
+    <xs:complexType name="web-appType">
+        <xs:sequence>
+            <xs:element ref="sys:dependency" minOccurs="0" maxOccurs="unbounded"/>
+
+            <xs:element name="context-root" type="xs:string" minOccurs="0"/>
+            <xs:element name="context-priority-classloader" type="xs:boolean"/>
+            <xs:element name="container-config" type="web:container-configType" minOccurs="0" maxOccurs="unbounded"/>
+
+            <xs:sequence minOccurs="0">
+                <xs:element name="security-realm-name" type="xs:string"/>
+                <xs:element ref="security:security" minOccurs="0"/>
+            </xs:sequence>
+
+            <!--xs:group ref="naming:jndiEnvironmentRefsGroup"/-->
+
+            <xs:element ref="naming:ejb-ref" minOccurs="0" maxOccurs="unbounded"/>
+            <xs:element ref="naming:ejb-local-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"/>
+            <xs:element ref="naming:resource-env-ref" minOccurs="0" maxOccurs="unbounded"/>
+
+            <xs:element ref="sys:gbean" minOccurs="0" maxOccurs="unbounded"/>
+
+        </xs:sequence>
+        <xs:attribute name="configId" type="xs:string" use="required"/>
+        <xs:attribute name="parentId" type="xs:string" use="optional"/>
+    </xs:complexType>
+
+    <xs:simpleType name="web-containerType">
+        <xs:restriction base="xs:string">
+            <xs:whiteSpace value="collapse"/>
+            <xs:enumeration value="Tomcat"/>
+            <xs:enumeration value="Jetty"/>
+        </xs:restriction>
+    </xs:simpleType>
+</xs:schema>

Added: geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml (added)
+++ geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml Sat Jul  2 19:21:55 2005
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!-- @version $Rev: 57116 $ $Date: 2004-11-09 18:34:38 -0700 (Tue, 09 Nov 2004) $ -->
+<xb:config xmlns:xb="http://www.bea.com/2002/09/xbean/config">
+    <xb:namespace uri="http://geronimo.apache.org/xml/ns/web">
+        <xb:package>org.apache.geronimo.xbeans.geronimo.web</xb:package>
+<!--        <xb:prefix>Web</xb:prefix> -->
+    </xb:namespace>
+</xb:config>

Added: geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml (added)
+++ geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml Sat Jul  2 19:21:55 2005
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<tomcat:web-app
+    xmlns:tomcat="http://geronimo.apache.org/xml/ns/web/tomcat"
+    configId="org/apache/geronimo/tomcat/Test"
+    >
+    <tomcat:context-root>/test</tomcat:context-root>
+    <tomcat:context-priority-classloader>false</tomcat:context-priority-classloader>
+    <!--
+        <tomcat:security>
+            <sec:default-principal realm-name="foo">
+                <sec:principal class="org.apache.geronimo.security.DefaultPrincipal"
+                    name="bar"/>
+            </sec:default-principal>
+        </tomcat:security>
+    -->
+</tomcat:web-app>

Added: geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/web.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/web.xml?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/web.xml (added)
+++ geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/WEB-INF/web.xml Sat Jul  2 19:21:55 2005
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Copyright 2004 The Apache Software Foundation
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+  
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+    <description>Test Web Deployment</description>
+    <resource-env-ref>
+        <resource-env-ref-name>fake-resource-env-ref</resource-env-ref-name>
+        <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
+    </resource-env-ref>
+    <resource-ref>
+        <res-ref-name>fake-resource-ref</res-ref-name>
+        <res-type>javax.sql.DataSource</res-type>
+        <res-auth>Container</res-auth>
+        <res-sharing-scope>Shareable</res-sharing-scope>
+    </resource-ref>
+    <ejb-ref>
+        <ejb-ref-name>fake-ejb-ref</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <home>some.package.FakeHome</home>
+        <remote>some.package.Fake</remote>
+    </ejb-ref>
+    <ejb-ref>
+        <ejb-ref-name>another-ejb-ref</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <home>some.package.FakeHome</home>
+        <remote>some.package.Fake</remote>
+    </ejb-ref>
+    <ejb-local-ref>
+        <ejb-ref-name>fake-ejb-local-ref</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>some.package.FakeLocalHome</local-home>
+        <local>some.package.FakeLocal</local>
+    </ejb-local-ref>
+    <ejb-local-ref>
+        <ejb-ref-name>another-ejb-local-ref</ejb-ref-name>
+        <ejb-ref-type>Entity</ejb-ref-type>
+        <local-home>some.package.FakeLocalHome</local-home>
+        <local>some.package.FakeLocal</local>
+    </ejb-local-ref>
+<!--    <service-ref>-->
+<!--        <service-ref-name>fake-service-ref</service-ref-name>-->
+<!--        <service-interface>some.package.FakeService</service-interface>-->
+<!--    </service-ref>-->
+</web-app>
\ No newline at end of file

Added: geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/hello.txt
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/hello.txt?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/hello.txt (added)
+++ geronimo/trunk/modules/web-builder/src/test-resources/deployables/war1/hello.txt Sat Jul  2 19:21:55 2005
@@ -0,0 +1 @@
+Hello World

Added: geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java?rev=208876&view=auto
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java (added)
+++ geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java Sat Jul  2 19:21:55 2005
@@ -0,0 +1,120 @@
+/**
+ *
+ * Copyright 2003-2004 The Apache Software Foundation
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.geronimo.web.deployment;
+
+import java.util.Arrays;
+import java.net.URL;
+import javax.enterprise.deploy.model.DDBean;
+import javax.enterprise.deploy.model.DDBeanRoot;
+import javax.enterprise.deploy.spi.DeploymentConfiguration;
+
+import junit.framework.TestCase;
+import org.apache.geronimo.deployment.tools.loader.WebDeployable;
+import org.apache.geronimo.web.deployment.WebAppDConfigRoot;
+import org.apache.geronimo.web.deployment.WebAppDConfigBean;
+import org.apache.geronimo.web.deployment.WARConfiguration;
+
+/**
+ * @version $Rev: 56771 $ $Date: 2004-11-06 12:58:54 -0700 (Sat, 06 Nov 2004) $
+ */
+public class WebAppDConfigTest extends TestCase {
+    private DeploymentConfiguration config;
+    private WebDeployable deployable;
+    private DDBeanRoot ddBeanRoot;
+    private WebAppDConfigRoot configRoot;
+
+    public void testWebAppRoot() throws Exception {
+        assertNotNull(configRoot);
+        assertTrue(Arrays.equals(new String[]{"web-app"}, configRoot.getXpaths()));
+        assertNotNull(configRoot.getDConfigBean(ddBeanRoot.getChildBean("web-app")[0]));
+        assertNull(configRoot.getDConfigBean(ddBeanRoot.getChildBean("web-app/description")[0]));
+    }
+
+    public void testWebApp() throws Exception {
+        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
+        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);
+        assertNotNull(webApp);
+/*
+        String[] xpaths = webApp.getXpaths();
+        assertTrue(Arrays.equals(
+                new String[]{
+                    "ejb-ref",
+                    "ejb-local-ref",
+                    "message-destination-ref",
+                    "resource-env-ref",
+                    "resource-ref",
+                },
+                xpaths)
+        );
+*/
+    }
+
+/*
+    public void testEJBRef() throws Exception {
+        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
+        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);
+        DDBean[] ddBeans = ddBean.getChildBean(webApp.getXpaths()[0]);
+        assertEquals(2, ddBeans.length);
+        assertEquals("fake-ejb-ref", ddBeans[0].getChildBean("ejb-ref-name")[0].getText());
+        assertEquals("another-ejb-ref", ddBeans[1].getChildBean("ejb-ref-name")[0].getText());
+
+        EJBRefDConfigBean ejbRef0 = (EJBRefDConfigBean) webApp.getDConfigBean(ddBeans[0]);
+        EJBRefDConfigBean ejbRef1 = (EJBRefDConfigBean) webApp.getDConfigBean(ddBeans[1]);
+        assertNotNull(ejbRef0);
+        assertEquals(ddBeans[0], ejbRef0.getDDBean());
+        assertNotNull(ejbRef1);
+        assertEquals(ddBeans[1], ejbRef1.getDDBean());
+        assertTrue(ejbRef0 != ejbRef1);
+    }
+*/
+
+/*
+    public void testEJBLocalRef() throws Exception {
+        DDBean ddBean = ddBeanRoot.getChildBean("web-app")[0];
+        WebAppDConfigBean webApp = (WebAppDConfigBean) configRoot.getDConfigBean(ddBean);
+        DDBean[] ddBeans = ddBean.getChildBean(webApp.getXpaths()[1]);
+        assertEquals(2, ddBeans.length);
+        assertEquals("fake-ejb-local-ref", ddBeans[0].getChildBean("ejb-ref-name")[0].getText());
+        assertEquals("another-ejb-local-ref", ddBeans[1].getChildBean("ejb-ref-name")[0].getText());
+
+        EJBLocalRefDConfigBean ejbRef0 = (EJBLocalRefDConfigBean) webApp.getDConfigBean(ddBeans[0]);
+        EJBLocalRefDConfigBean ejbRef1 = (EJBLocalRefDConfigBean) webApp.getDConfigBean(ddBeans[1]);
+        assertNotNull(ejbRef0);
+        assertEquals(ddBeans[0], ejbRef0.getDDBean());
+        assertNotNull(ejbRef1);
+        assertEquals(ddBeans[1], ejbRef1.getDDBean());
+        assertTrue(ejbRef0 != ejbRef1);
+    }
+*/
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+        URL warDir = classLoader.getResource("deployables/war1/");
+        System.out.println("WAR DIRECTORY: "+warDir);
+        deployable = new WebDeployable(warDir);
+        config = new WARConfiguration(deployable);
+
+        ddBeanRoot = deployable.getDDBeanRoot();
+        configRoot = (WebAppDConfigRoot) config.getDConfigBeanRoot(ddBeanRoot);
+    }
+
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+}



Mime
View raw message