Author: dain
Date: Wed Sep 19 18:41:39 2007
New Revision: 577495
URL: http://svn.apache.org/viewvc?rev=577495&view=rev
Log:
Merging 577123 from trunk
Stop auto creation of apps directory
Test using the itests war instead of the ejb-jar file
Modified:
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/maven.xml
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
Modified: openejb/branches/3.0-beta-1/assembly/openejb-tomcat/maven.xml
URL:
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/assembly/openejb-tomcat/maven.xml?rev=577495&r1=577494&r2=577495&view=diff
==============================================================================
--- openejb/branches/3.0-beta-1/assembly/openejb-tomcat/maven.xml (original)
+++ openejb/branches/3.0-beta-1/assembly/openejb-tomcat/maven.xml Wed Sep 19
18:41:39 2007
@@ -206,7 +206,6 @@
<goal name="setup:itests-war">
<j:set var="targetDir" value="${basedir}/target/"/>
<j:set var="itests.war"
value="openejb-tomcat-${openejb.version}-itests.war"/>
- <mkdir dir="${tomcat.home}/apps"/>
<u:file var="fileAsFile" name="${tomcat.home}/webapps/itests.war"/>
<j:if test="${!(fileAsFile.exists())}">
@@ -227,7 +226,7 @@
<attainGoal name="tomcat6"/>
<attainGoal name="setup:tomcat"/>
<attainGoal name="setup:loader-webapp"/>
- <attainGoal name="setup:itests"/>
+ <attainGoal name="setup:itests-war"/>
<attainGoal name="setup:ejb-examples"/>
<attainGoal name="start:tomcat"/>
</goal>
@@ -236,7 +235,7 @@
<attainGoal name="tomcat6"/>
<attainGoal name="setup:tomcat"/>
<attainGoal name="setup:loader-webapp"/>
- <attainGoal name="setup:itests"/>
+ <attainGoal name="setup:itests-war"/>
<attainGoal name="setup:ejb-examples"/>
<attainGoal name="start:tomcat-debug"/>
</goal>
@@ -244,7 +243,7 @@
<goal name="test:tomcat">
<attainGoal name="setup:tomcat"/>
<attainGoal name="setup:loader-webapp"/>
- <attainGoal name="setup:itests"/>
+ <attainGoal name="setup:itests-war"/>
<attainGoal name="start:tomcat"/>
<java jar="target/openejb-tomcat-${openejb.version}-test.jar" fork="yes">
<sysproperty key="openejb.home"
value="target/openejb-${openejb.version}"/>
Modified:
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
URL:
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java?rev=577495&r1=577494&r2=577495&view=diff
==============================================================================
---
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
(original)
+++
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatLoader.java
Wed Sep 19 18:41:39 2007
@@ -57,10 +57,6 @@
SystemInstance.init(props);
- // DMB: This is ugly here, all this code could use some cleaning
- if ("tomcat-system".equals(props.getProperty("openejb.loader"))){
- SystemInstance.get().getBase().getDirectory("apps", true);
- }
ejbServer = new EjbServer();
SystemInstance.get().setComponent(EjbServer.class, ejbServer);
OpenEJB.init(props, new ServerFederation());
Modified:
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
URL:
http://svn.apache.org/viewvc/openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java?rev=577495&r1=577494&r2=577495&view=diff
==============================================================================
---
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
(original)
+++
openejb/branches/3.0-beta-1/assembly/openejb-tomcat/src/main/java/org/apache/openejb/tomcat/TomcatWebAppBuilder.java
Wed Sep 19 18:41:39 2007
@@ -169,13 +169,14 @@
private AppModule loadApplication(ServletContext servletContext,
ClassLoader classLoader) {
// read the web.xml
- WebApp webApp = null;
+ WebApp webApp = new WebApp();
try {
URL webXmlUrl = servletContext.getResource("/WEB-INF/web.xml");
- webApp = ReadDescriptors.readWebApp(webXmlUrl);
+ if (webXmlUrl != null) {
+ webApp = ReadDescriptors.readWebApp(webXmlUrl);
+ }
} catch (Exception e) {
logger.error("Unable to load web.xml in war " +
servletContext.getContextPath() + ": Exception: " + e.getMessage(), e);
- return null;
}
String basePath = servletContext.getRealPath(".");