You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by am...@apache.org on 2005/07/03 05:55:47 UTC
svn commit: r208881 - in /geronimo/trunk/modules: tomcat-builder/
tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/
tomcat-builder/src/schema/
tomcat-builder/src/test-resources/deployables/war1/WEB-INF/
tomcat-builder/src/test-resources/de...
Author: ammulder
Date: Sat Jul 2 20:55:45 2005
New Revision: 208881
URL: http://svn.apache.org/viewcvs?rev=208881&view=rev
Log:
Migrate Tomcat to the new common geronimo-web.xml deployment plan format
Added:
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml
- copied, changed from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-tomcat.xml
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml
- copied, changed from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-tomcat.xml
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml
- copied, changed from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-tomcat.xml
Removed:
geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/WARConfiguration.java
geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/WARConfigurer.java
geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/WebAppDConfigBean.java
geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/WebAppDConfigRoot.java
geronimo/trunk/modules/tomcat-builder/src/schema/
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-tomcat.xml
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-tomcat.xml
geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-tomcat.xml
geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/WebAppDConfigTest.java
Modified:
geronimo/trunk/modules/tomcat-builder/maven.xml
geronimo/trunk/modules/tomcat-builder/project.xml
geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
geronimo/trunk/modules/tomcat-builder/src/test-resources/plans/plan1.xml
geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.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-web.xsd
geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml
geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java
Modified: geronimo/trunk/modules/tomcat-builder/maven.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/maven.xml?rev=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/maven.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/maven.xml Sat Jul 2 20:55:45 2005
@@ -23,16 +23,7 @@
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-tomcat.xsd"
- xmlconfigs="${basedir}/src/schema/xmlconfig.xml"
- targetdir="${basedir}/target/xmlbeans"
- cataloglocation="${basedir}/../j2ee-schema/src/catalog/resolver-catalog.xml"/>
- </preGoal>
+>
<preGoal name="test:test">
Modified: geronimo/trunk/modules/tomcat-builder/project.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/project.xml?rev=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/project.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/project.xml Sat Jul 2 20:55:45 2005
@@ -99,6 +99,15 @@
</properties>
</dependency>
+ <dependency>
+ <groupId>geronimo</groupId>
+ <artifactId>geronimo-web-builder</artifactId>
+ <version>${pom.currentVersion}</version>
+ <properties>
+ <xmlbeans>true</xmlbeans>
+ </properties>
+ </dependency>
+
<dependency>
<groupId>geronimo</groupId>
<artifactId>geronimo-tomcat</artifactId>
Modified: geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java?rev=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java (original)
+++ geronimo/trunk/modules/tomcat-builder/src/java/org/apache/geronimo/tomcat/deployment/TomcatModuleBuilder.java Sat Jul 2 20:55:45 2005
@@ -91,8 +91,11 @@
import org.apache.geronimo.tomcat.util.SecurityHolder;
import org.apache.geronimo.transaction.context.OnlineUserTransaction;
import org.apache.geronimo.webservices.WebServiceContainer;
-import org.apache.geronimo.xbeans.geronimo.tomcat.TomcatWebAppDocument;
-import org.apache.geronimo.xbeans.geronimo.tomcat.TomcatWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebAppDocument;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.GerContainerConfigType;
+import org.apache.geronimo.xbeans.geronimo.web.GerConfigParamType;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebContainerType;
import org.apache.geronimo.xbeans.j2ee.FilterMappingType;
import org.apache.geronimo.xbeans.j2ee.HttpMethodType;
import org.apache.geronimo.xbeans.j2ee.RoleNameType;
@@ -177,7 +180,7 @@
// parse vendor dd
- TomcatWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath, webApp);
+ GerWebAppType tomcatWebApp = getTomcatWebApp(plan, moduleFile, standAlone, targetPath, webApp);
// get the ids from either the application plan or for a stand alone module from the specific deployer
URI configId = null;
@@ -237,22 +240,22 @@
return map;
}
- TomcatWebAppType getTomcatWebApp(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
- TomcatWebAppType tomcatWebApp = null;
+ GerWebAppType getTomcatWebApp(Object plan, JarFile moduleFile, boolean standAlone, String targetPath, WebAppType webApp) throws DeploymentException {
+ GerWebAppType tomcatWebApp = null;
try {
- // load the geronimo-tomcat.xml from either the supplied plan or from the earFile
+ // load the geronimo-web.xml from either the supplied plan or from the earFile
try {
if (plan instanceof XmlObject) {
- tomcatWebApp = (TomcatWebAppType) SchemaConversionUtils.getNestedObjectAsType((XmlObject) plan,
+ tomcatWebApp = (GerWebAppType) SchemaConversionUtils.getNestedObjectAsType((XmlObject) plan,
"web-app",
- TomcatWebAppType.type);
+ GerWebAppType.type);
} else {
- TomcatWebAppDocument tomcatWebAppdoc = null;
+ GerWebAppDocument tomcatWebAppdoc = null;
if (plan != null) {
- tomcatWebAppdoc = TomcatWebAppDocument.Factory.parse((File) plan);
+ tomcatWebAppdoc = GerWebAppDocument.Factory.parse((File) plan);
} else {
- URL path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-tomcat.xml");
- tomcatWebAppdoc = TomcatWebAppDocument.Factory.parse(path);
+ URL path = DeploymentUtil.createJarURL(moduleFile, "WEB-INF/geronimo-web.xml");
+ tomcatWebAppdoc = GerWebAppDocument.Factory.parse(path);
}
if (tomcatWebAppdoc != null) {
tomcatWebApp = tomcatWebAppdoc.getWebApp();
@@ -263,9 +266,9 @@
// if we got one extract and validate it otherwise create a default one
if (tomcatWebApp != null) {
- tomcatWebApp = (TomcatWebAppType) SchemaConversionUtils.convertToGeronimoNamingSchema(tomcatWebApp);
- tomcatWebApp = (TomcatWebAppType) SchemaConversionUtils.convertToGeronimoSecuritySchema(tomcatWebApp);
- tomcatWebApp = (TomcatWebAppType) SchemaConversionUtils.convertToGeronimoServiceSchema(tomcatWebApp);
+ tomcatWebApp = (GerWebAppType) SchemaConversionUtils.convertToGeronimoNamingSchema(tomcatWebApp);
+ tomcatWebApp = (GerWebAppType) SchemaConversionUtils.convertToGeronimoSecuritySchema(tomcatWebApp);
+ tomcatWebApp = (GerWebAppType) SchemaConversionUtils.convertToGeronimoServiceSchema(tomcatWebApp);
SchemaConversionUtils.validateDD(tomcatWebApp);
} else {
String path;
@@ -284,7 +287,7 @@
return tomcatWebApp;
}
- private TomcatWebAppType createDefaultPlan(String path, WebAppType webApp) {
+ private GerWebAppType createDefaultPlan(String path, WebAppType webApp) {
String id = webApp.getId();
if (id == null) {
id = path;
@@ -296,7 +299,7 @@
}
}
- TomcatWebAppType tomcatWebApp = TomcatWebAppType.Factory.newInstance();
+ GerWebAppType tomcatWebApp = GerWebAppType.Factory.newInstance();
// set the parentId, configId and context root
tomcatWebApp.setParentId(defaultParentId.toString());
@@ -330,8 +333,8 @@
// and the url class loader will not pick up a manifiest from an unpacked dir
earContext.addManifestClassPath(warFile, URI.create(module.getTargetPath()));
- // add the dependencies declared in the geronimo-tomcat.xml file
- TomcatWebAppType tomcatWebApp = (TomcatWebAppType) module.getVendorDD();
+ // add the dependencies declared in the geronimo-web.xml file
+ GerWebAppType tomcatWebApp = (GerWebAppType) module.getVendorDD();
DependencyType[] dependencies = tomcatWebApp.getDependencyArray();
ServiceConfigBuilder.addDependencies(earContext, dependencies, repository);
} catch (IOException e) {
@@ -351,7 +354,7 @@
WebModule webModule = (WebModule) module;
WebAppType webApp = (WebAppType) webModule.getSpecDD();
- TomcatWebAppType tomcatWebApp = (TomcatWebAppType) webModule.getVendorDD();
+ GerWebAppType tomcatWebApp = (GerWebAppType) webModule.getVendorDD();
boolean contextPriorityClassLoader = false;
if (tomcatWebApp != null) {
@@ -405,25 +408,58 @@
webModuleData.setReferencePattern("trackedConnectionAssociator", earContext.getConnectionTrackerObjectName());
webModuleData.setReferencePattern("Container", tomcatContainerObjectName);
- //Is there a Tomcat realm declaration?
- if (tomcatWebApp != null) {
- String tomcatRealm = tomcatWebApp.getTomcatRealm();
+ String virtualServer = null;
+ // Process the Tomcat container-config elements
+ if (tomcatWebApp != null && tomcatWebApp.sizeOfContainerConfigArray() > 0) {
+ Map values = new HashMap();
+ GerContainerConfigType[] configs = tomcatWebApp.getContainerConfigArray();
+ for (int i = 0; i < configs.length; i++) {
+ GerContainerConfigType config = configs[i];
+ if(config.getContainer().intValue() != GerWebContainerType.INT_TOMCAT) {
+ continue;
+ }
+ GerConfigParamType[] params = config.getConfigParamArray();
+ for (int j = 0; j < params.length; j++) {
+ GerConfigParamType param = params[j];
+ values.put(param.getName(), param.getStringValue());
+ }
+ }
+
+ //Is there a Tomcat virtual server declaration?
+ virtualServer = (String) values.remove("VirtualServer");
+
+ //Is there a Tomcat realm declaration?
+ String tomcatRealm = (String) values.remove("TomcatRealm");
if (tomcatRealm != null) {
ObjectName realmName = NameFactory.getComponentName(null, null, null, null, tomcatRealm.trim(), RealmGBean.GBEAN_INFO.getJ2eeType(), moduleJ2eeContext);
webModuleData.setReferencePattern("TomcatRealm", realmName);
}
- }
-
- //Is there a Tomcat Valve Chain declaration?
- if (tomcatWebApp != null) {
- String tomcatValveChain = tomcatWebApp.getTomcatValveChain();
+ //Is there a Tomcat Valve Chain declaration?
+ String tomcatValveChain = (String) values.remove("TomcatValveChain");
if (tomcatValveChain != null) {
ObjectName valveName = NameFactory.getComponentName(null, null, null, null, tomcatValveChain.trim(), ValveGBean.J2EE_TYPE, moduleJ2eeContext);
//NameFactory.getComponentName(null, null, null, null, tomcatValveChain.trim(), ValveGbean., moduleJ2eeContext);
webModuleData.setReferencePattern("TomcatValveChain", valveName);
}
+
+ // Are there any leftover values? If so, that's a problem.
+ if(values.size() > 0) {
+ StringBuffer msg = new StringBuffer();
+ msg.append("Unexpected container-config/config-params found for Tomcat in web app deployment plan (");
+ boolean first = true;
+ for (Iterator it = values.keySet().iterator(); it.hasNext();) {
+ String value = (String) it.next();
+ if(!first) {
+ msg.append(",");
+ }
+ msg.append(value);
+ }
+ msg.append(")");
+ throw new DeploymentException(msg.toString());
+ }
}
+
Map portMap = webModule.getPortMap();
//Handle the role permissions and webservices on the servlets.
@@ -489,7 +525,6 @@
webModuleData.setReferencePattern("RoleDesignateSource", earContext.getJaccManagerName());
}
- String virtualServer = tomcatWebApp.getVirtualServer();
if (virtualServer != null) {
webModuleData.setAttribute("virtualServer", virtualServer);
}
@@ -797,7 +832,7 @@
}
}
- private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, TomcatWebAppType tomcatWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
+ private Map buildComponentContext(EARContext earContext, Module webModule, WebAppType webApp, GerWebAppType tomcatWebApp, UserTransaction userTransaction, ClassLoader cl) throws DeploymentException {
return ENCConfigBuilder.buildComponentContext(earContext,
webModule,
userTransaction,
Copied: geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml (from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-tomcat.xml)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml?p2=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml&p1=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-tomcat.xml&r1=208816&r2=208881&rev=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-tomcat.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war1/WEB-INF/geronimo-web.xml Sat Jul 2 20:55:45 2005
@@ -17,7 +17,7 @@
-->
<tomcat:web-app
- xmlns:tomcat="http://geronimo.apache.org/xml/ns/web/tomcat"
+ xmlns:tomcat="http://geronimo.apache.org/xml/ns/web"
configId="org/apache/geronimo/tomcat/Test"
>
<tomcat:context-root>/test</tomcat:context-root>
Copied: geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml (from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-tomcat.xml)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml?p2=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml&p1=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-tomcat.xml&r1=208816&r2=208881&rev=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-tomcat.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war3/WEB-INF/geronimo-web.xml Sat Jul 2 20:55:45 2005
@@ -17,7 +17,7 @@
-->
<web-app
- xmlns="http://geronimo.apache.org/xml/ns/web/jetty"
+ xmlns="http://geronimo.apache.org/xml/ns/web"
xmlns:sec="http://geronimo.apache.org/xml/ns/security"
configId="org/apache/geronimo/test">
Copied: geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml (from r208816, geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-tomcat.xml)
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml?p2=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml&p1=geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-tomcat.xml&r1=208816&r2=208881&rev=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-tomcat.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test-resources/deployables/war4/WEB-INF/geronimo-web.xml Sat Jul 2 20:55:45 2005
@@ -16,15 +16,17 @@
limitations under the License.
-->
<web-app
- xmlns="http://geronimo.apache.org/xml/ns/web/tomcat"
+ xmlns="http://geronimo.apache.org/xml/ns/web"
xmlns:sec="http://geronimo.apache.org/xml/ns/security"
configId="org/apache/geronimo/test">
<context-root>/test</context-root>
<context-priority-classloader>false</context-priority-classloader>
- <tomcat-realm>TomcatRealm</tomcat-realm>
- <tomcat-valve-chain>FirstValve</tomcat-valve-chain>
-
+ <container-config container="Tomcat">
+ <config-param name="TomcatRealm" >TomcatRealm</config-param>
+ <config-param name="TomcatValveChain">FirstValve</config-param>
+ </container-config>
+
<security-realm-name>test</security-realm-name>
<security>
<default-principal realm-name="geronimo-properties-realm">
Modified: geronimo/trunk/modules/tomcat-builder/src/test-resources/plans/plan1.xml
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test-resources/plans/plan1.xml?rev=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test-resources/plans/plan1.xml (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test-resources/plans/plan1.xml Sat Jul 2 20:55:45 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://geronimo.apache.org/xml/ns/web/tomcat"
+<web-app xmlns="http://geronimo.apache.org/xml/ns/web"
configId="goodservlet"
parentId="org/apache/geronimo/DefaultDatabase">
<context-priority-classloader>false</context-priority-classloader>
Modified: geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java?rev=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java (original)
+++ geronimo/trunk/modules/tomcat-builder/src/test/org/apache/geronimo/tomcat/deployment/PlanParsingTest.java Sat Jul 2 20:55:45 2005
@@ -7,8 +7,8 @@
import org.apache.geronimo.kernel.jmx.JMXUtil;
import org.apache.geronimo.schema.SchemaConversionUtils;
import org.apache.geronimo.xbeans.geronimo.naming.GerResourceRefType;
-import org.apache.geronimo.xbeans.geronimo.tomcat.TomcatWebAppDocument;
-import org.apache.geronimo.xbeans.geronimo.tomcat.TomcatWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebAppDocument;
/**
*/
@@ -20,13 +20,13 @@
public void testResourceRef() throws Exception {
File resourcePlan = new File(basedir, "src/test-resources/plans/plan1.xml");
assertTrue(resourcePlan.exists());
- TomcatWebAppType jettyWebApp = builder.getTomcatWebApp(resourcePlan, null, true, null, null);
+ GerWebAppType jettyWebApp = builder.getTomcatWebApp(resourcePlan, null, true, null, null);
assertEquals(1, jettyWebApp.getResourceRefArray().length);
}
public void testConstructPlan() throws Exception {
- TomcatWebAppDocument tomcatWebAppDoc = TomcatWebAppDocument.Factory.newInstance();
- TomcatWebAppType tomcatWebAppType = tomcatWebAppDoc.addNewWebApp();
+ GerWebAppDocument tomcatWebAppDoc = GerWebAppDocument.Factory.newInstance();
+ GerWebAppType tomcatWebAppType = tomcatWebAppDoc.addNewWebApp();
tomcatWebAppType.setConfigId("configId");
tomcatWebAppType.setParentId("parentId");
tomcatWebAppType.setContextPriorityClassloader(false);
Modified: 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=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java (original)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigBean.java Sat Jul 2 20:55:45 2005
@@ -24,7 +24,7 @@
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.geronimo.xbeans.geronimo.web.GerWebAppType;
import org.apache.xmlbeans.SchemaTypeLoader;
/**
@@ -33,7 +33,7 @@
public class WebAppDConfigBean extends DConfigBeanSupport {
private final ENCHelper encHelper;
- WebAppDConfigBean(DDBean ddBean, WebAppType webApp) {
+ WebAppDConfigBean(DDBean ddBean, GerWebAppType webApp) {
super(ddBean, webApp);
ENCHelper.XmlEnvRefs envRefs = new ENCHelper.XmlEnvRefs(webApp.getEjbRefArray(), webApp.getEjbLocalRefArray(), webApp.getResourceRefArray(), webApp.getResourceEnvRefArray());
@@ -48,8 +48,8 @@
}
- WebAppType getWebApp() {
- return (WebAppType) getXmlObject();
+ GerWebAppType getWebApp() {
+ return (GerWebAppType) getXmlObject();
}
public String getContextRoot() {
Modified: 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=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java (original)
+++ geronimo/trunk/modules/web-builder/src/java/org/apache/geronimo/web/deployment/WebAppDConfigRoot.java Sat Jul 2 20:55:45 2005
@@ -25,8 +25,8 @@
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.geronimo.xbeans.geronimo.web.GerWebAppDocument;
+import org.apache.geronimo.xbeans.geronimo.web.GerWebAppType;
import org.apache.xmlbeans.SchemaTypeLoader;
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlException;
@@ -37,7 +37,7 @@
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())
+ XmlBeans.typeLoaderForClassLoader(GerWebAppDocument.class.getClassLoader())
});
private static String[] XPATHS = {
@@ -47,18 +47,18 @@
private WebAppDConfigBean webAppBean;
public WebAppDConfigRoot(DDBeanRoot ddBean) {
- super(ddBean, WebAppDocument.Factory.newInstance());
- WebAppType webApp = getWebAppDocument().addNewWebApp();
+ super(ddBean, GerWebAppDocument.Factory.newInstance());
+ GerWebAppType webApp = getWebAppDocument().addNewWebApp();
replaceWebAppDConfigBean(webApp);
}
- private void replaceWebAppDConfigBean(WebAppType webApp) {
+ private void replaceWebAppDConfigBean(GerWebAppType webApp) {
DDBean ddBean = getDDBean();
webAppBean = new WebAppDConfigBean(ddBean.getChildBean(XPATHS[0])[0], webApp);
}
- WebAppDocument getWebAppDocument() {
- return (WebAppDocument) getXmlObject();
+ GerWebAppDocument getWebAppDocument() {
+ return (GerWebAppDocument) getXmlObject();
}
public String[] getXpaths() {
Modified: 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=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd (original)
+++ geronimo/trunk/modules/web-builder/src/schema/geronimo-web.xsd Sat Jul 2 20:55:45 2005
@@ -42,7 +42,7 @@
</xs:annotation>
<xs:simpleContent>
<xs:extension base="xs:string">
- <xs:attribute name="name" type="xs:string"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
@@ -50,7 +50,7 @@
<xs:complexType name="container-configType">
<xs:annotation>
<xs:documentation>
- Holds any configuration settings appropriate to the
+ 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
@@ -58,10 +58,14 @@
configuration options. We recommend these be avoided
wherever possible for the sake of portability.
+ Known containers are:
+ Tomcat
+ Jetty
+
Some known parameters are:
- Tomcat virtual-server
- Tomcat tomcat-realm
- Tomcat tomcat-valve-chain
+ Tomcat: VirtualServer
+ Tomcat: TomcatRealm
+ Tomcat: TomcatValveChain
An authoritative list is left to the individual container
documentation.
</xs:documentation>
Modified: 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=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml (original)
+++ geronimo/trunk/modules/web-builder/src/schema/xmlconfig.xml Sat Jul 2 20:55:45 2005
@@ -19,6 +19,6 @@
<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:prefix>Ger</xb:prefix>
</xb:namespace>
</xb:config>
Modified: 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=208881&r1=208880&r2=208881&view=diff
==============================================================================
--- geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java (original)
+++ geronimo/trunk/modules/web-builder/src/test/org/apache/geronimo/web/deployment/WebAppDConfigTest.java Sat Jul 2 20:55:45 2005
@@ -106,7 +106,6 @@
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);