[CVS spice] jervlet moved to components
proyal-yCVjj/[email protected] 5 Jul 2005 13:34:16 -0000
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>spice/sandbox/jervlet</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-1</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt><a href="#file2"><span id="removed">base-project.xml</span></a></tt></td><td></td><td align="right" id="removed">-87</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt>demoserver/<a href="#file3"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file4"><span id="removed">maven.xml</span></a></tt></td><td></td><td align="right" id="removed">-5</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file5"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-3</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file6"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-75</td><td nowrap="nowrap">1.5 removed</td></tr>
<tr><td><tt>demoserver/src/conf/<a href="#file7"><span id="removed">assembly.xml</span></a></tt></td><td></td><td align="right" id="removed">-17</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file8"><span id="removed">config.xml</span></a></tt></td><td></td><td align="right" id="removed">-8</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file9"><span id="removed">environment.xml</span></a></tt></td><td></td><td align="right" id="removed">-7</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt>jervlet/<a href="#file10"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file11"><span id="removed">maven.xml</span></a></tt></td><td></td><td align="right" id="removed">-6</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file12"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file13"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-58</td><td nowrap="nowrap">1.8 removed</td></tr>
<tr class="alt"><td><tt>jervlet/src/conf/schema/<a href="#file14"><span id="removed">JervletDeployer-schema.xml</span></a></tt></td><td></td><td align="right" id="removed">-14</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>jervlet/src/java/org/jcomponent/jervlet/<a href="#file15"><span id="removed">AvalonJervletContext.java</span></a></tt></td><td></td><td align="right" id="removed">-123</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file16"><span id="removed">CommonsLoggingJervletMonitor.java</span></a></tt></td><td></td><td align="right" id="removed">-57</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file17"><span id="removed">DefaultJervletMonitor.java</span></a></tt></td><td></td><td align="right" id="removed">-47</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file18"><span id="removed">Jervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-90</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file19"><span id="removed">JervletConfig.java</span></a></tt></td><td></td><td align="right" id="removed">-23</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file20"><span id="removed">JervletConfigBean.java</span></a></tt></td><td></td><td align="right" id="removed">-33</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file21"><span id="removed">JervletConfigStub.java</span></a></tt></td><td></td><td align="right" id="removed">-41</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file22"><span id="removed">JervletContext.java</span></a></tt></td><td></td><td align="right" id="removed">-64</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file23"><span id="removed">JervletException.java</span></a></tt></td><td></td><td align="right" id="removed">-102</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file24"><span id="removed">JervletMonitor.java</span></a></tt></td><td></td><td align="right" id="removed">-27</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt> /<a href="#file25"><span id="removed">MultihostJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-24</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file26"><span id="removed">PicoJervletContext.java</span></a></tt></td><td></td><td align="right" id="removed">-76</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file27"><span id="removed">SimpleJervletContext.java</span></a></tt></td><td></td><td align="right" id="removed">-65</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file28"><span id="removed">package.html</span></a></tt></td><td></td><td align="right" id="removed">-33</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>jervlet/src/java/org/jcomponent/jervlet/blocks/deployer/<a href="#file29"><span id="removed">JervletDeployer.java</span></a></tt></td><td></td><td align="right" id="removed">-151</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr class="alt"><td><tt>jervlet-jetty/<a href="#file30"><span id="removed">.cvsignore</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file31"><span id="removed">maven.xml</span></a></tt></td><td></td><td align="right" id="removed">-6</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file32"><span id="removed">project.properties</span></a></tt></td><td></td><td align="right" id="removed">-4</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file33"><span id="removed">project.xml</span></a></tt></td><td></td><td align="right" id="removed">-57</td><td nowrap="nowrap">1.7 removed</td></tr>
<tr class="alt"><td><tt>jervlet-jetty/src/conf/schema/<a href="#file34"><span id="removed">JettyJervlet-schema.xml</span></a></tt></td><td></td><td align="right" id="removed">-24</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt>jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty/<a href="#file35"><span id="removed">AbstractJettyJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-50</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file36"><span id="removed">AvalonJettyJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-424</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt> /<a href="#file37"><span id="removed">AvalonLogSink.java</span></a></tt></td><td></td><td align="right" id="removed">-123</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file38"><span id="removed">BeanJettyJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-363</td><td nowrap="nowrap">1.3 removed</td></tr>
<tr><td><tt> /<a href="#file39"><span id="removed">CommonsLoggingLogSink.java</span></a></tt></td><td></td><td align="right" id="removed">-117</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file40"><span id="removed">JervletServletHolder.java</span></a></tt></td><td></td><td align="right" id="removed">-109</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr><td><tt> /<a href="#file41"><span id="removed">JervletWebApplicationContext.java</span></a></tt></td><td></td><td align="right" id="removed">-98</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file42"><span id="removed">JervletWebApplicationHandler.java</span></a></tt></td><td></td><td align="right" id="removed">-89</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file43"><span id="removed">JettyJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-75</td><td nowrap="nowrap">1.2 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file44"><span id="removed">JettyRequestLogAdapter.java</span></a></tt></td><td></td><td align="right" id="removed">-89</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file45"><span id="removed">NCSARequestLogger.java</span></a></tt></td><td></td><td align="right" id="removed">-148</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file46"><span id="removed">NullRequestLogger.java</span></a></tt></td><td></td><td align="right" id="removed">-68</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file47"><span id="removed">PicoJettyJervlet.java</span></a></tt></td><td></td><td align="right" id="removed">-346</td><td nowrap="nowrap">1.4 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file48"><span id="removed">PicoStartableException.java</span></a></tt></td><td></td><td align="right" id="removed">-61</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file49"><span id="removed">RequestLogger.java</span></a></tt></td><td></td><td align="right" id="removed">-71</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr class="alt"><td><tt> /<a href="#file50"><span id="removed">SimpleLogSink.java</span></a></tt></td><td></td><td align="right" id="removed">-55</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td><tt> /<a href="#file51"><span id="removed">WebApplicationContextHolder.java</span></a></tt></td><td></td><td align="right" id="removed">-173</td><td nowrap="nowrap">1.1 removed</td></tr>
<tr><td></td><td></td><td align="right" id="removed">-3803</td><td></td></tr>
</table>
<small id="info">51 removed files</small><br />
<pre class="comment">
jervlet moved to components
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1 +0,0 @@
</small></pre><pre class="diff" id="removed">-.project
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>base-project.xml</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N base-project.xml
--- base-project.xml 20 Jun 2004 11:20:37 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,87 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project>
-
- <pomVersion>3</pomVersion>
-
- <groupId>jervlet</groupId>
-
- <organization>
- <name>codehaus</name>
- <url>http://codehaus.org</url>
- <logo>http://codehaus.org/codehaus-small.gif</logo>
- </organization>
-
- <url>http://spice.codehaus.org/</url>
- <siteAddress>codehaus.org</siteAddress>
- <siteDirectory>/www/spice.codehaus.org/</siteDirectory>
- <distributionSite>codehaus.org</distributionSite>
- <distributionDirectory>/www/dist.codehaus.org</distributionDirectory>
- <issueTrackingUrl>http://jira.codehaus.org/secure/BrowseProject.jspa?id=10140</issueTrackingUrl>
- <repository>
- <connection>scm:cvs:pserver:[email protected]:/cvsroot/spice:sandbox/jervlet}</connection>
- <url>http://cvs.codehaus.org/viewcvs.cgi/spice/?root=codehaus</url>
- </repository>
-
- <licenses>
- <license
- name="The Spice Software License, Version 1.1"
- url="${pom.distributionSite}/LICENSE.txt"
- distribution="repo"/>
- </licenses>
-
- <dependencies>
- <dependency>
- <groupId>dna</groupId>
- <artifactId>maven-dna-plugin</artifactId>
- <version>1.1</version>
- <type>plugin</type>
- </dependency>
- <dependency>
- <groupId>metaclass</groupId>
- <artifactId>maven-metaclass-plugin</artifactId>
- <version>1.1</version>
- <type>plugin</type>
- </dependency>
- <dependency>
- <groupId>loom</groupId>
- <artifactId>maven-loom-plugin</artifactId>
- <version>1.0-rc1</version>
- <type>plugin</type>
- </dependency>
- <dependency>
- <id>picocontainer</id>
- <version>1.0</version>
- <url>http://www.picocontainer.org/</url>
- </dependency>
- <dependency>
- <id>commons-logging</id>
- <version>1.0.3</version>
- <url>http://jakarta.apache.org/commons/logging.html</url>
- </dependency>
- </dependencies>
-
- <mailingLists>
- <mailingList>
- <name>Spice Users List</name>
- <subscribe>spice-user-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</subscribe>
- <unsubscribe>spice-user-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</unsubscribe>
- <archive>http://lists.codehaus.org/pipermail/spice-user/</archive>
- </mailingList>
- <mailingList>
- <name>Spice Developers List</name>
- <subscribe>spice-dev-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</subscribe>
- <unsubscribe>spice-dev-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</unsubscribe>
- <archive>http://lists.codehaus.org/pipermail/spice-dev/</archive>
- </mailingList>
- <mailingList>
- <name>Spice CVS Commits List</name>
- <subscribe>spice-scm-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</subscribe>
- <unsubscribe>spice-scm-request-81qHHgoATdGxIXFVlbCvtR2eb7JE58TQ@public.gmane.org</unsubscribe>
- <archive>http://lists.codehaus.org/pipermail/spice-scm/</archive>
- </mailingList>
- </mailingLists>
-
- <build><nagEmailAddress>[email protected]</nagEmailAddress></build>
-
-</project>
-
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore 10 Jul 2004 13:22:29 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-.classpath
-.project
-maven.log
-target
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver<br /></span>
<div class="fileheader" id="removed"><big><b>maven.xml</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N maven.xml
--- maven.xml 19 Jun 2004 11:35:24 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,5 +0,0 @@
</small></pre><pre class="diff" id="removed">-<project default="build">
- <goal name="build" prereqs="clean">
- <attainGoal name="loom:sar"/>
- </goal>
-</project>
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties 2 Nov 2003 10:57:57 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.xdoc.date=left
-maven.xdoc.version=${pom.currentVersion}
-maven.sar.metagenerate=false
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.5</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml 20 Jun 2004 11:20:37 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,75 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project>
-
- <pomVersion>3</pomVersion>
- <extend>${basedir}/../base-project.xml</extend>
-
- <id>jervlet-demoserver</id>
- <name>Jervlet Demonstration Server</name>
- <currentVersion>0.7-dev</currentVersion>
-
- <inceptionYear>2003</inceptionYear>
- <shortDescription>Demonstration project for building a deployable SAR using Jervlet.</shortDescription>
-
- <developers>
- <developer>
- <name>Ryan Hoegg</name>
- <id>rhoegg</id>
- <email>[email protected]</email>
- <organization>ISIS Networks</organization>
- <roles>
- <role>Developer</role>
- </roles>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <id>jervlet</id>
- <version>0.7-dev</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- <dependency>
- <groupId>jervlet</groupId>
- <artifactId>jervlet-jetty</artifactId>
- <version>0.7-dev</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- <dependency>
- <id>jetty</id>
- <version>4.2.12</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- <dependency>
- <id>servletapi</id>
- <version>2.3</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-runtime</artifactId>
- <version>4.0.4</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- <dependency>
- <groupId>tomcat</groupId>
- <artifactId>jasper-compiler</artifactId>
- <version>4.0.4</version>
- <properties>
- <sar.bundle>true</sar.bundle>
- </properties>
- </dependency>
- </dependencies>
-
-</project>
-
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver/src/conf<br /></span>
<div class="fileheader" id="removed"><big><b>assembly.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N assembly.xml
--- assembly.xml 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" ?>
-<assembly>
- <block name="jervlet-jetty-logger"
- class="org.jcomponent.jervlet.blocks.jetty.NullRequestLogger"/>
- <block name="jervlet-jetty"
- class="org.jcomponent.jervlet.blocks.jetty.JettyJervlet">
- <provide
- name="jervlet-jetty-logger"
- role="org.jcomponent.jervlet.blocks.jetty.RequestLogger"/>
- </block>
- <block name="jervlet-deployer"
- class="org.jcomponent.jervlet.blocks.deployer.JervletDeployer">
- <provide
- name="jervlet-jetty"
- role="org.jcomponent.jervlet.Jervlet"/>
- </block>
-</assembly>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver/src/conf<br /></span>
<div class="fileheader" id="removed"><big><b>config.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N config.xml
--- config.xml 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" ?>
-<config>
- <jervlet-deployer>
- <Context docBase="/" path="."/>
- </jervlet-deployer>
- <jervlet-jetty-logger/>
- <jervlet-jetty/>
-</config>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/demoserver/src/conf<br /></span>
<div class="fileheader" id="removed"><big><b>environment.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N environment.xml
--- environment.xml 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" ?>
-<environment>
- <logs>
- <category name="" target="default" priority="DEBUG"/>
- <log-target name="default" location="logs/default.log"/>
- </logs>
-</environment>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-.classpath
-.project
-maven.log
-target
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file11" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>maven.xml</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N maven.xml
--- maven.xml 19 Jun 2004 11:35:24 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
</small></pre><pre class="diff" id="removed">-<project default="install">
- <goal name="install" prereqs="clean">
- <attainGoal name="loom:metagenerate"/>
- <attainGoal name="jar:install"/>
- </goal>
-</project>
</pre></div>
<hr /><a name="file12" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.xdoc.date=left
-maven.xdoc.version=${pom.currentVersion}
-
-maven.sar.metagenerate=true
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file13" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.8</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml 21 Jun 2004 07:28:22 -0000 1.8
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,58 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project>
-
- <pomVersion>3</pomVersion>
-
- <extend>${basedir}/../base-project.xml</extend>
-
- <id>jervlet</id>
- <name>Jervlet</name>
- <currentVersion>0.7-dev</currentVersion>
-
- <inceptionYear>2003</inceptionYear>
- <package>org.jcomponent.jervlet</package>
-
- <developers>
- <developer>
- <name>Ryan Hoegg</name>
- <id>rhoegg</id>
- <email>[email protected]</email>
- <organization>ISIS Networks</organization>
- <roles>
- <role>Developer</role>
- </roles>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <id>avalon-framework</id>
- <version>4.1.5</version>
- </dependency>
- <dependency>
- <groupId>avalon-phoenix</groupId>
- <artifactId>avalon-phoenix-client</artifactId>
- <version>4.0.4</version>
- </dependency>
- <dependency>
- <groupId>loom</groupId>
- <artifactId>loom-engine</artifactId>
- <version>1.0-rc1</version>
- </dependency>
- </dependencies>
-
- <build>
- <sourceDirectory>${basedir}/src/java</sourceDirectory>
- <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/conf/schema</directory>
- <targetPath>org/jcomponent/jervlet/blocks/deployer</targetPath>
- <includes>
- <include>JervletDeployer-schema.xml</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
-
</pre></div>
<hr /><a name="file14" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/conf/schema<br /></span>
<div class="fileheader" id="removed"><big><b>JervletDeployer-schema.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JervletDeployer-schema.xml
--- JervletDeployer-schema.xml 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0"?>
-<element
- name="root"
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
->
- <oneOrMore>
- <element name="Context">
- <attribute name="docBase"/>
- <attribute name="path"/>
- <empty/>
- </element>
- </oneOrMore>
-</element>
</pre></div>
<hr /><a name="file15" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>AvalonJervletContext.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AvalonJervletContext.java
--- AvalonJervletContext.java 6 Nov 2003 20:25:46 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,123 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet;
-
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.container.ContainerUtil;
-
-/**
- * Holder class for objects to be used when creating servlets under Jervlet
- *
- * If a servlet is LogEnabled then the logger is set on the servlet.
- * If a servlet is Servicable then the serviceManager is set on the servlet.
- * If a servlet is Contextualizable then the context is set on the servlet
- * @author Ben Hogan
- */
-public class AvalonJervletContext implements JervletContext
-{
- private ServiceManager m_serviceManager;
- private Logger m_logger;
- private Context m_context;
-
- public AvalonJervletContext( Context context, ServiceManager serviceManager, Logger logger )
- {
- m_context = context;
- m_serviceManager = serviceManager;
- m_logger = logger;
- }
-
- public ServiceManager getServiceManager()
- {
- return m_serviceManager;
- }
-
- public Logger getLogger()
- {
- return m_logger;
- }
-
- public Context getContext()
- {
- return m_context;
- }
-
- public Object instantiate(Class servletClass) throws InstantiationException, IllegalAccessException {
- final Logger logger = getLogger();
- Object instance = servletClass.newInstance();
-
- try
- {
- ContainerUtil.enableLogging( instance, logger );
- ContainerUtil.contextualize( instance, getContext() );
-
- final ServiceManager manager = getServiceManager();
- if( null != manager )
- {
- ContainerUtil.service( instance, manager );
- }
-
- ContainerUtil.initialize( instance );
- }
- catch( Exception e )
- {
- final String msg = "Exception during lifecycle processing for servlet "
- + servletClass.getName() + ":" + e.getMessage();
-
- logger.error( msg, e );
-
- throw new InstantiationException( msg );
- }
-
- return instance;
- }
-}
-
</pre></div>
<hr /><a name="file16" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>CommonsLoggingJervletMonitor.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N CommonsLoggingJervletMonitor.java
--- CommonsLoggingJervletMonitor.java 6 Nov 2003 21:13:56 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-import org.apache.commons.logging.LogFactory;
-
-public class CommonsLoggingJervletMonitor extends DefaultJervletMonitor {
-
- public void startException(Class reportingClass, String context, Exception e) throws JervletException {
- LogFactory.getFactory().getInstance(reportingClass).error("Exception starting Context '"+ context+"' :" + e.getMessage(),e);
- super.startException(reportingClass, context, e);
- }
-
- public void stopException(Class reportingClass, String context, Exception e) throws JervletException {
- LogFactory.getFactory().getInstance(reportingClass).error("Exception stopping Context '"+ context+"' :" + e.getMessage(),e);
- super.stopException(reportingClass,context,e );
- }
-
- public void redeployException(Class reportingClass, String context, JervletException e) throws JervletException {
- LogFactory.getFactory().getInstance(reportingClass).error("Exception redeploying Context '"+ context+"' :" + e.getMessage(),e);
- super.redeployException(reportingClass, context, e);
- }
-
- public void deployingContext(Class reportingClass, String context, String webappUrl, String hostName) {
- LogFactory.getFactory().getInstance(reportingClass).info("Deploying Context '"+ context
- +"', WebAppUrl '"+webappUrl
- +"', HostName '"+ hostName(hostName) +"'");
- super.deployingContext(reportingClass, context, webappUrl, hostName);
- }
- private String hostName(String hostName) {
- return (hostName == null ? "(All Hosts)" : hostName);
- }
-
- public void undeployException(Class reportingClass, String context, Exception e) throws JervletException {
- LogFactory.getFactory().getInstance(reportingClass).error("Exception undeploying Context '"+ context+"' :" + e.getMessage(),e);
- super.undeployException(reportingClass, context, e);
- }
-
- public void deployingException(Class reportingClass, String context, String webappUrl, String hostName, Exception e) throws JervletException {
- LogFactory.getFactory().getInstance(reportingClass).error("Exception deploying Context '"+ context
- +"', WebAppUrl '"+webappUrl
- +"', HostName '"+ hostName(hostName) +"'");
- super.deployingException(reportingClass, context, webappUrl, hostName, e);
- }
-
- public void undeployWarning(Class reportingClass, String context, String msg) {
- LogFactory.getFactory().getInstance(reportingClass).warn("Warning undeploying Context '"+ context
- +"' Message: '" + msg +"'");
- super.undeployWarning(reportingClass, context, msg);
- }
-}
</pre></div>
<hr /><a name="file17" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>DefaultJervletMonitor.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N DefaultJervletMonitor.java
--- DefaultJervletMonitor.java 6 Nov 2003 22:06:04 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,47 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-public class DefaultJervletMonitor implements JervletMonitor {
-
- public void startException(Class reportingClass, String context, Exception e) throws JervletException {
- final String msg = "Unable to start '" + context + "' : " + e.getMessage();
- throw new JervletException(msg, e);
- }
-
- public void stopException(Class reportingClass, String context, Exception e) throws JervletException {
- final String msg = "Unable to stop '" + context + "' : " + e.getMessage();
- throw new JervletException(msg, e);
- }
-
- public void redeployException(Class reportingClass, String context, JervletException e) throws JervletException {
- throw e;
- }
-
- public void deployingContext(Class reportingClass, String context, String webappUrl, String hostName) {
-
- }
-
- public void undeployException(Class reportingClass, String context, Exception e) throws JervletException {
- final String msg = "Problem stopping web application in Jetty for context '" + context + "'";
- throw new JervletException(msg, e);
- }
-
- public void deployingException(Class reportingClass, String context, String webappUrl, String hostName, Exception e) throws JervletException {
- final String msg = "Unable to deploy '" + context + "' : " + e.getMessage();
- throw new JervletException(msg, e);
- }
-
- public void undeployWarning(Class reportingClass, String context, String msg) {
- final String emsg = "Unable to deploy '" + context + "' Reason : " + msg;
- // do something with it ?
-
- }
-
-}
</pre></div>
<hr /><a name="file18" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>Jervlet.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N Jervlet.java
--- Jervlet.java 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,90 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet;
-
-import java.io.File;
-
-/**
- * Jervlet defines an interface that servlet containers can be wrapped behind
- *
- * @author Vinay Chandrasekharan<vinayc77-/[email protected]>
- * @author Ryan Hoegg
- * @version 1.0
- */
-public interface Jervlet
-{
- /** Role of the Jervlet Service*/
- String ROLE = Jervlet.class.getName();
-
- /**
- * Deploy the given Web Application
- * @param context Context for the the webapp
- * @param pathToWebAppFolder path can be a war-archive or exploded directory
- * @throws JervletException Thrown when context already exists
- */
- void deploy( String context, File pathToWebAppFolder ) throws JervletException;
-
- /**
- * Deploy the given Web Application
- * @param context Context for the the webapp
- * @param pathToWebAppFolder path can be a war-archive or exploded directory
- * @param jervletContext the context that is applied to the servlet on instantiation.
- * @throws JervletException Thrown when context already exists
- */
- void deploy( String context, File pathToWebAppFolder, JervletContext jervletContext )
- throws JervletException;
-
- /**
- * Undeploy the given WebApp
- * @param context Context for the the webapp
- * @throws JervletException Thrown if context does NOT exist
- */
- void undeploy( String context ) throws JervletException;
-}
</pre></div>
<hr /><a name="file19" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletConfig.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N JervletConfig.java
--- JervletConfig.java 6 Nov 2003 20:32:44 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,23 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-public interface JervletConfig {
-
- String getHostName();
-
- int getPort();
-
- int getMinThreads();
-
- int getMaxThreads();
-
- boolean getExtractWarFile();
-
-}
</pre></div>
<hr /><a name="file20" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletConfigBean.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N JervletConfigBean.java
--- JervletConfigBean.java 6 Nov 2003 20:32:44 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-public class JervletConfigBean extends JervletConfigStub {
-
- public void setExtractWarFile(boolean extractWebArchive) {
- this.m_extractWebArchive = extractWebArchive;
- }
-
- public void setMaxThreads(int maxThreads) {
- this.m_maxThreads = maxThreads;
- }
-
- public void setMinThreads(int minThreads) {
- this.m_minThreads = minThreads;
- }
-
- public void setPort(int port) {
- this.m_port = port;
- }
-
- public void setHostName(String hostName) {
- this.m_hostName = hostName;
- }
-
-}
</pre></div>
<hr /><a name="file21" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletConfigStub.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JervletConfigStub.java
--- JervletConfigStub.java 6 Nov 2003 20:32:44 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-public class JervletConfigStub implements JervletConfig {
-
- /** Virtual host to bind the Jetty to. null implies all hosts are in context. */
- protected String m_hostName;
-
- protected int m_port;
- protected int m_minThreads;
- protected int m_maxThreads;
- protected boolean m_extractWebArchive;
-
- public boolean getExtractWarFile() {
- return m_extractWebArchive;
- }
-
- public int getMaxThreads() {
- return m_maxThreads;
- }
-
- public int getMinThreads() {
- return m_minThreads;
- }
-
- public int getPort() {
- return m_port;
- }
-
- public String getHostName() {
- return m_hostName;
- }
-
-}
</pre></div>
<hr /><a name="file22" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletContext.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N JervletContext.java
--- JervletContext.java 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,64 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet;
-
-
-
-/**
- * Holder class for objects to be used when creating servlets under Jervlet
- *
- * @author Paul Hammant
- */
-public interface JervletContext
-{
- Object instantiate(Class servletClass) throws InstantiationException, IllegalAccessException;
-
-}
-
</pre></div>
<hr /><a name="file23" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletException.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JervletException.java
--- JervletException.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,102 +0,0 @@
</small></pre><pre class="diff" id="removed">-/* ====================================================================
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2002,2003 The Apache Software Foundation. All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. The end-user documentation included with the redistribution,
- * if any, must include the following acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software
- * itself, if and wherever such third-party acknowledgments
- * normally appear.
- *
- * 4. The names "Avalon", and "Apache Software Foundation"
- * must not be used to endorse or promote products derived from this
- * software without prior written permission. For written
- * permission, please contact [email protected]
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.jcomponent.jervlet;
-
-import org.apache.avalon.framework.CascadingThrowable;
-
-/**
- * General Exception indicating the state of the Embedded Web Server i.e. Catalina
- *
- * @author <a href="mailto:vinayc77-/[email protected]">Vinay Chandran</a>
- */
-public class JervletException extends Exception implements CascadingThrowable
-{
- /**
- * The Throwable that caused this exception to be thrown.
- */
- private final Throwable m_throwable;
-
- /**
- * Construct a new <code>JervletException</code> instance.
- *
- * @param message The detail message for this exception.
- */
- public JervletException( final String message )
- {
- this( message, null );
- }
-
- /**
- * Construct a new <code>JervletException</code> instance.
- *
- * @param message The detail message for this exception.
- * @param throwable the root cause of the exception
- */
- public JervletException( final String message, final Throwable throwable )
- {
- super( message );
- m_throwable = throwable;
- }
-
- /**
- * Retrieve root cause of the exception.
- *
- * @return the root cause
- */
- public final Throwable getCause()
- {
- return m_throwable;
- }
-}
</pre></div>
<hr /><a name="file24" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>JervletMonitor.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N JervletMonitor.java
--- JervletMonitor.java 6 Nov 2003 21:13:56 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
- * Copyright (C) The Spice Group. All rights reserved.
- *
- * This software is published under the terms of the Spice
- * Software License version 1.1, a copy of which has been included
- * with this distribution in the LICENSE.txt file.
- */
-
-package org.jcomponent.jervlet;
-
-public interface JervletMonitor {
-
- void startException(Class reportingClass, String context, Exception e) throws JervletException;
-
- void stopException(Class reportingClass, String context, Exception e) throws JervletException;
-
- void redeployException(Class reportingClass, String context, JervletException e) throws JervletException;
-
- void deployingContext(Class reportingClass, String context, String webappUrl, String hostName);
-
- void undeployException(Class reportingClass, String context, Exception e) throws JervletException;
-
- void deployingException(Class reportingClass, String context, String webappUrl, String hostName, Exception e) throws JervletException;
-
- void undeployWarning(Class reportingClass, String context, String msg);
-
-}
</pre></div>
<hr /><a name="file25" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>MultihostJervlet.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N MultihostJervlet.java
--- MultihostJervlet.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.jcomponent.jervlet;
-
-import java.io.File;
-
-public interface MultihostJervlet
-{
- /** Role of the MultihostJervlet Service*/
- public String ROLE = MultihostJervlet.class.getName();
-
- /**
- * Deploy the given Web Application
- * @param context Context for the the webapp
- * @param pathToWebAppFolder path can be a war-archive or exploded directory
- * @throws JervletException Thrown when context already exists
- */
- void deploy( String host, String context, File pathToWebAppFolder ) throws JervletException;
-
- /**
- * Undeploy the given WebApp
- * @param context Context for the the webapp
- * @throws JervletException Thrown if context does NOT exist
- */
- void undeploy( String host, String context ) throws JervletException;
-}
</pre></div>
<hr /><a name="file26" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>PicoJervletContext.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N PicoJervletContext.java
--- PicoJervletContext.java 19 Jun 2004 14:39:02 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,76 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet;
-
-import org.picocontainer.MutablePicoContainer;
-import org.picocontainer.defaults.DefaultPicoContainer;
-
-/**
- * Holder class for objects to be used when creating servlets under Jervlet
- *
- * @author Paul Hammant
- */
-public class PicoJervletContext implements JervletContext
-{
- private final MutablePicoContainer parentContainer;
-
- public PicoJervletContext( MutablePicoContainer mutablePicoContainer )
- {
- this.parentContainer = mutablePicoContainer;
- }
-
- public Object instantiate(Class servletClass) throws InstantiationException, IllegalAccessException {
- MutablePicoContainer picoContainer = new DefaultPicoContainer(parentContainer);
- picoContainer.registerComponentImplementation(servletClass);
- return picoContainer.getComponentInstance(servletClass);
- }
-
-}
-
</pre></div>
<hr /><a name="file27" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>SimpleJervletContext.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SimpleJervletContext.java
--- SimpleJervletContext.java 6 Nov 2003 21:13:56 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,65 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet;
-
-/**
- * Holder class for objects to be used when creating servlets under Jervlet
- *
- * @author Paul Hammant
- */
-public class SimpleJervletContext implements JervletContext
-{
-
- public Object instantiate(Class servletClass) throws InstantiationException, IllegalAccessException {
- return servletClass.newInstance();
- }
-
-}
-
</pre></div>
<hr /><a name="file28" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet<br /></span>
<div class="fileheader" id="removed"><big><b>package.html</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N package.html
--- package.html 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,33 +0,0 @@
</small></pre><pre class="diff" id="removed">-<html>
-<body>
- <h1>Introduction</h1>
- <p>
- Jervlet is a wrapper for various servlet engines in a Loom container.
- It launches the supported container under Loom control in embedded mode.
- </p>
-
- <!-- TODO: has this requirement changed?
- <h1>Usage</h1>
- <p>
- To use Jervlet, you will need to have tools.jar placed in the lib directory of
- Phoenix. This is not unusual as a requirement as applications like the excellent
- OrionServer have the same requirement. This will enable JSP processing. You will
- find it in JAVA_HOME/lib/. We can't include this in the SAR file for two reasons.
- The first is because it is part of the Java runtime environment and we have no
- permission to distribute that given it is copyright of Sun Microsystems. The
- second reason is that it is tied to the version of Java you are running. We can't
- provide a different base SAR for each version of the JDK (1.2, 1.2.2, 1,3, 1,3,1 ..)
- </p>
- -->
- <!-- TODO: update block documentation
- <h1>Blocks</h1>
- <p>
- There are two blocks delivered with Jervlet. The first is the block that provides
- the deployment/undepoyment of web applications to other blocks. That is
- org.jcontainer.loom.sevak.blocks.CatalinaJervletImpl. The second is one uses the
- first to mount Catalina's demo apps. The block class is
- org.jcontainer.loom.sevak.demo.JervletTest.
- </p>
- -->
-</body>
-</html>
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file29" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet/src/java/org/jcomponent/jervlet/blocks/deployer<br /></span>
<div class="fileheader" id="removed"><big><b>JervletDeployer.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N JervletDeployer.java
--- JervletDeployer.java 19 Jun 2004 14:39:02 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,151 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.deployer;
-
-import java.io.File;
-import org.jcomponent.jervlet.Jervlet;
-import org.jcomponent.jervlet.JervletContext;
-import org.jcomponent.jervlet.AvalonJervletContext;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-
-/**
- * @phoenix:block
- *
- * Test Jervlet (Tomcat wrapper).
- *
- * @author Vinay Chandran<vinayc77-/[email protected]>
- * @version 1.0
- */
-public class JervletDeployer
- extends AbstractLogEnabled
- implements Contextualizable, Serviceable, Configurable, Initializable
-{
- private Context m_context;
- private Configuration m_configuration;
- private ServiceManager m_manager;
- private Jervlet m_jervlet;
-
- public void contextualize( final Context context )
- {
- m_context = context;
- }
-
- /**
- * @phoenix:configuration-schema type="http://relaxng.org/ns/structure/1.0"
- */
- public void configure( final Configuration configuration )
- throws ConfigurationException
- {
- m_configuration = configuration;
- }
-
- /**
- * @see org.apache.avalon.framework.service.Serviceable
- * @phoenix:dependency name="org.jcomponent.jervlet.Jervlet"
- */
- public void service( final ServiceManager serviceManager )
- throws ServiceException
- {
- m_manager = serviceManager;
- m_jervlet = (Jervlet)m_manager.lookup( Jervlet.ROLE );
- }
-
- public void initialize() throws Exception
- {
- final JervletContext jervletContext = new AvalonJervletContext( m_context, m_manager, getLogger() );
- final Configuration[] contexts = m_configuration.getChildren( "Context" );
-
- for( int i = 0; i < contexts.length; i++ )
- {
- final String context = contexts[ i ].getAttribute( "docBase" );
- String path = contexts[ i ].getAttribute( "path" );
-
- path.replace( '/', File.separatorChar ).replace( '\\', File.separatorChar );
-
- final File pathFile = getAbsolutePath( path );
-
- if( !pathFile.exists() )
- {
- throw new ConfigurationException( "Path for webapp '" + context
- + "' does not exist [path: " + pathFile + "]" );
- }
- else if( !pathFile.canRead() )
- {
- throw new ConfigurationException( "Path for webapp '" + context
- + "' cannot be read [path: " + pathFile + "]" );
- }
-
- m_jervlet.deploy( context, pathFile, jervletContext );
- }
- }
-
- private File getAbsolutePath( String path )
- {
- if( path.startsWith( "file:" ) )
- {
- return new File( path.substring( "file:".length() ) );
- }
- else
- {
- return new File( "TODO");
-// m_context.getBaseDirectory().getAbsolutePath()
- // + File.separatorChar + path );
- }
- }
-}
</pre></div>
<hr /><a name="file30" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty<br /></span>
<div class="fileheader" id="removed"><big><b>.cvsignore</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N .cvsignore
--- .cvsignore 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-.classpath
-.project
-maven.log
-target
</pre></div>
<hr /><a name="file31" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty<br /></span>
<div class="fileheader" id="removed"><big><b>maven.xml</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N maven.xml
--- maven.xml 19 Jun 2004 11:35:24 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
</small></pre><pre class="diff" id="removed">-<project default="install">
- <goal name="install" prereqs="clean">
- <attainGoal name="loom:metagenerate"/>
- <attainGoal name="jar:install"/>
- </goal>
-</project>
</pre></div>
<hr /><a name="file32" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty<br /></span>
<div class="fileheader" id="removed"><big><b>project.properties</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N project.properties
--- project.properties 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,4 +0,0 @@
</small></pre><pre class="diff" id="removed">-maven.xdoc.date=left
-maven.xdoc.version=${pom.currentVersion}
-
-maven.sar.metagenerate=true
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file33" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty<br /></span>
<div class="fileheader" id="removed"><big><b>project.xml</b></big> <small id="info">removed after 1.7</small></div>
<pre class="diff"><small id="info">diff -N project.xml
--- project.xml 20 Jun 2004 11:20:37 -0000 1.7
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,57 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0" encoding="ISO-8859-1"?>
-<project>
-
- <pomVersion>3</pomVersion>
-
- <extend>${basedir}/../base-project.xml</extend>
-
- <id>jervlet-jetty</id>
- <name>Jervlet Jetty Component</name>
- <currentVersion>0.7-dev</currentVersion>
-
- <inceptionYear>2003</inceptionYear>
- <package>org.jcomponent.jervlet.blocks.jetty</package>
-
- <developers>
- <developer>
- <name>Ryan Hoegg</name>
- <id>rhoegg</id>
- <email>[email protected]</email>
- <organization>ISIS Networks</organization>
- <roles>
- <role>Developer</role>
- </roles>
- </developer>
- </developers>
-
- <dependencies>
- <dependency>
- <groupId>jervlet</groupId>
- <artifactId>jervlet</artifactId>
- <version>0.7-dev</version>
- </dependency>
- <dependency>
- <id>jetty</id>
- <version>4.2.12</version>
- </dependency>
- <dependency>
- <id>avalon-framework</id>
- <version>4.1.5</version>
- </dependency>
- </dependencies>
-
- <build>
- <sourceDirectory>${basedir}/src/java</sourceDirectory>
- <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
- <resources>
- <resource>
- <directory>${basedir}/src/conf/schema</directory>
- <targetPath>org/jcomponent/jervlet/blocks/jetty</targetPath>
- <includes>
- <include>JettyJervlet-schema.xml</include>
- </includes>
- </resource>
- </resources>
- </build>
-</project>
-
</pre></div>
<hr /><a name="file34" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/conf/schema<br /></span>
<div class="fileheader" id="removed"><big><b>JettyJervlet-schema.xml</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JettyJervlet-schema.xml
--- JettyJervlet-schema.xml 28 Oct 2003 05:07:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,24 +0,0 @@
</small></pre><pre class="diff" id="removed">-<?xml version="1.0"?>
-<element
- name="root"
- xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
->
- <interleave>
- <optional>
- <element name="hostname"><text/></element>
- </optional>
- <optional>
- <element name="port"><data type="integer"/></element>
- </optional>
- <optional>
- <element name="minthreads"><data type="integer"/></element>
- </optional>
- <optional>
- <element name="maxthreads"><data type="integer"/></element>
- </optional>
- <optional>
- <element name="extract-war"><data type="boolean"/></element>
- </optional>
- </interleave>
-</element>
</pre></div>
<hr /><a name="file35" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>AbstractJettyJervlet.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N AbstractJettyJervlet.java
--- AbstractJettyJervlet.java 19 Jun 2004 14:39:02 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.mortbay.jetty.Server;
-import org.mortbay.http.SocketListener;
-import org.jcomponent.jervlet.JervletConfig;
-import org.jcomponent.jervlet.JervletException;
-
-import java.net.UnknownHostException;
-import java.util.HashMap;
-
-public class AbstractJettyJervlet {
-
- protected JervletConfig config;
- protected Server m_server;
- protected HashMap m_webcontexts = new HashMap();
-
- protected final Server createHttpServer()
- {
- return new Server();
- }
-
- protected final SocketListener createSocketListener() throws UnknownHostException
- {
- SocketListener listener = new SocketListener();
-
- if( null != config.getHostName() )
- {
- listener.setHost( config.getHostName() );
- }
-
- listener.setPort( config.getPort() );
- listener.setMinThreads( config.getMinThreads() );
- listener.setMaxThreads( config.getMaxThreads() );
- return listener;
- }
-
- protected final WebApplicationContextHolder getWebApplicationContextHolder( String context )
- throws JervletException
- {
- WebApplicationContextHolder holder =
- (WebApplicationContextHolder)m_webcontexts.get( context );
-
- if( null == holder )
- {
- throw new JervletException( "Unknown context: " + context );
- }
-
- return holder;
- }
-}
</pre></div>
<hr /><a name="file36" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>AvalonJettyJervlet.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N AvalonJettyJervlet.java
--- AvalonJettyJervlet.java 19 Jun 2004 14:39:02 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,424 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.activity.Startable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.ContextException;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.avalon.framework.CascadingRuntimeException;
-import org.jcomponent.jervlet.*;
-import org.mortbay.util.MultiException;
-
-import java.io.File;
-import java.util.Collections;
-import java.util.Set;
-
-/**
- * @phoenix:block
- * @phoenix:service name="org.jcomponent.jervlet.Jervlet"
- * @phoenix:mx-topic name="ServletContainer"
- *
- * Jetty Wrapper.
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @author Ulrich Mayring
- * @author Peter Royal
- * @author Ryan Hoegg
- * @version 1.0
- */
-public class AvalonJettyJervlet extends AbstractJettyJervlet
- implements Jervlet, Startable, Contextualizable, Configurable, Initializable, Serviceable, LogEnabled
-{
-
- private File m_sarRootDir;
- private AvalonJervletContext m_jervletContext;
- private Context m_context;
- private Logger m_logger;
-
- public void enableLogging(Logger logger) {
- m_logger = logger;
- }
-
- protected Logger getLogger() {
- return m_logger;
- }
-
- /**
- * @param serviceManager
- * @throws ServiceException
- *
- * @phoenix:dependency name="org.jcomponent.jervlet.blocks.jetty.RequestLogger"
- */
- public void service( ServiceManager serviceManager ) throws ServiceException
- {
- m_jervletContext = new AvalonJervletContext( m_context, serviceManager, getLogger() );
- }
-
- /**
- * Contextualize
- * @param context the context
- */
- public void contextualize( final Context context ) throws ContextException
- {
- m_context = context;
- m_sarRootDir = (File)context.get( "app.home" );
- }
-
- /**
- * Configure
- * @param configuration the configuration
- * @throws ConfigurationException if a problem
- *
- * @phoenix:configuration-schema type="http://relaxng.org/ns/structure/1.0"
- */
- public void configure( final Configuration configuration ) throws ConfigurationException
- {
- JervletConfigBean config = new JervletConfigBean();
-
- config.setHostName(configuration.getChild( "hostname" ).getValue( null ));
- config.setPort(configuration.getChild( "port" ).getValueAsInteger( 8080 ));
- config.setMinThreads(configuration.getChild( "minthreads" ).getValueAsInteger( 5 ));
- config.setMaxThreads(configuration.getChild( "maxthreads" ).getValueAsInteger( 250 ));
- config.setExtractWarFile(configuration.getChild( "extract-war" ).getValueAsBoolean( true ));
-
- if( config.getMaxThreads() < config.getMinThreads() )
- {
- throw new ConfigurationException( "maxthreads must be greater than minthreads" );
- }
- }
-
- /**
- * Initialize
- * @throws Exception if a problem
- */
- public void initialize() throws Exception
- {
- m_server = createHttpServer();
- m_server.addListener( createSocketListener() );
-
- RequestLogger logger = (RequestLogger)
- m_jervletContext.getServiceManager().lookup( RequestLogger.ROLE );
- m_server.setRequestLog( new JettyRequestLogAdapter( logger ) );
- }
-
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder ) throws JervletException
- {
- deploy( context, pathToWebAppFolder, m_jervletContext );
- }
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @param jervletContext The optional context to apply to servlets (LogEnabled, Serviceable).
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder, JervletContext jervletContext )
- throws JervletException
- {
- if( m_webcontexts.containsKey( context ) )
- {
- throw new JervletException( "Context '" + context + "' has already been deployed" );
- }
-
- WebApplicationContextHolder holder;
-
- try
- {
- holder = new WebApplicationContextHolder( context,
- pathToWebAppFolder,
- jervletContext,
- m_sarRootDir,
- config.getExtractWarFile() );
- m_webcontexts.put( context, holder );
- }
- catch( Exception e )
- {
- final String msg = "Problem deploying web application (" + pathToWebAppFolder
- + ") in Jetty";
-
- throw new JervletException( msg, e );
- }
-
- deploy( context );
- }
-
- /**
- * Get a list of all webapps currently installed with the container
- *
- * @phoenix:mx-attribute
- *
- * @return The list of all contexts installed in the container
- */
- public Set getContextList()
- {
- return Collections.unmodifiableSet( m_webcontexts.keySet() );
- }
-
- /**
- * Get the status of an installed webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to get status of
- * @return status of webapp
- * @throws JervletException if any problems occur
- */
- public String getStatus( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- return holder.getStatus();
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void start( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.start();
- }
- catch( Exception e )
- {
- final String msg = "Unable to start '" + context + "' : " + e.getMessage();
- getLogger().error( msg, e );
- throw new JervletException( msg, e );
- }
- }
-
- /**
- * Stop a running webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to stop
- * @throws JervletException if any problems occur
- */
- public void stop( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( Exception e )
- {
- final String msg = "Unable to stop '" + context + "' : " + e.getMessage();
- getLogger().error( msg, e );
- throw new JervletException( msg, e );
- }
- }
-
- /**
- * Redeploy a webapp. This operation fully reloads the webapp, and is equivalent to
- * doing undeploy() followed by deploy()
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to reload
- * @throws JervletException if any problems occur
- */
- public void redeploy( String context ) throws JervletException
- {
- try
- {
- undeploy( context );
- deploy( context );
- }
- catch( JervletException e )
- {
- getLogger().error( "Exception restarting: " + context, e );
-
- throw e;
- }
- }
-
- /**
- * Deploy a webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to deploy
- * @throws JervletException if any problems occur
- */
- public void deploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- //Set the context classloader because the current classloader will be that of the
- Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
-
- try
- {
- m_server.addContext( config.getHostName(), holder.create() );
-
- if( getLogger().isInfoEnabled() )
- getLogger().info( "deploying context=" + context + ", webapp="
- + holder.getWebappUrl() + " to host="
- + ( config.getHostName() == null ? "(All Hosts)" : config.getHostName() ) );
-
- holder.start();
- }
- catch( Exception e )
- {
- final String msg = "Unable to deploy '" + context + "' : " + e.getMessage();
-
- getLogger().error( msg, e );
- throw new JervletException( msg, e );
- }
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void undeploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( InterruptedException e )
- {
- final String msg = "Problem stopping web application in Jetty";
-
- getLogger().error( msg, e );
-
- throw new JervletException( msg, e );
- }
-
- if( !m_server.removeContext( holder.getWebApplicationContext() ) )
- {
- getLogger().warn( "Potential problems removing context" );
- }
-
- try
- {
- holder.destroy();
- }
- catch( Exception e )
- {
- final String msg = "Problem destroying web application in Jetty";
-
- getLogger().error( msg, e );
-
- throw new JervletException( msg, e );
- }
- }
-
- /**
- * Start
- */
- public final void start()
- {
- try
- {
- m_server.start();
- }
- catch( MultiException e )
- {
- throw new CascadingRuntimeException( "Some problem starting Jetty", e );
- }
- }
-
- /**
- * Stop
- */
- public final void stop()
- {
- try
- {
- m_server.stop();
- }
- catch( InterruptedException e )
- {
- throw new CascadingRuntimeException( "Some problem stopping Jetty", e );
- }
- }
-}
-
-
-
</pre></div>
<hr /><a name="file37" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>AvalonLogSink.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N AvalonLogSink.java
--- AvalonLogSink.java 6 Nov 2003 22:06:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,123 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.apache.avalon.framework.logger.LogEnabled;
-import org.apache.avalon.framework.logger.Logger;
-import org.mortbay.util.Frame;
-import org.mortbay.util.Log;
-
-/**
- * Jetty Log redirection
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Bruno Dumon & Paul Hammant
- * @version 1.0
- */
-public class AvalonLogSink extends SimpleLogSink implements LogEnabled
-{
- private Logger logger;
-
- public void enableLogging(Logger logger) {
- this.logger = logger;
- }
-
- /**
- * Log something
- * @param type the type of message
- * @param message the message
- * @param frame the frame
- * @param time the time
- */
- public void log( String type, Object message, Frame frame, long time )
- {
- if( type.equals( Log.DEBUG ) )
- {
- if( getLogger().isDebugEnabled() )
- getLogger().debug( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.FAIL ) )
- {
- if( getLogger().isErrorEnabled() )
- getLogger().error( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.WARN ) )
- {
- if( getLogger().isWarnEnabled() )
- getLogger().warn( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.ASSERT ) )
- {
- if( getLogger().isInfoEnabled() )
- getLogger().info( "ASSERT time=" + time + " message=" + message + " frame=" + frame );
- }
- else
- {
- getLogger().info( "time=" + time + " message=" + message + " frame=" + frame );
- }
- }
-
- private Logger getLogger() {
- return logger;
- }
-
- /**
- * Log a message
- * @param message the Message
- */
- public void log( String message )
- {
- getLogger().info( message );
- }
-
-
-}
</pre></div>
<hr /><a name="file38" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>BeanJettyJervlet.java</b></big> <small id="info">removed after 1.3</small></div>
<pre class="diff"><small id="info">diff -N BeanJettyJervlet.java
--- BeanJettyJervlet.java 19 Jun 2004 14:39:02 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,363 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.jcomponent.jervlet.*;
-import org.mortbay.jetty.Server;
-import org.mortbay.util.MultiException;
-import org.apache.avalon.framework.CascadingRuntimeException;
-
-import java.io.File;
-import java.net.UnknownHostException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Set;
-
-/**
- *
- * Jetty Wrapper for SpringFramework etc
- * Type-2 IoC
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @author Ulrich Mayring
- * @author Peter Royal
- * @author Ryan Hoegg
- * @version 1.0
- */
-public class BeanJettyJervlet extends AbstractJettyJervlet
- implements Jervlet
-{
-
- private JervletMonitor monitor;
- private File appRootDir;
- private JervletContext jervletContext;
-
- private Server m_server;
-
- private HashMap m_webcontexts = new HashMap();
- private RequestLogger requestLogger;
-
- public void setJervletConfig(JervletConfig config) {
- super.config = config;
- }
-
- public void setRequestLogger(RequestLogger requestLogger) {
- this.requestLogger = requestLogger;
- }
-
- public void setAppRootDir(File appRootDir) {
- this.appRootDir = appRootDir;
- }
-
- public void setJervletMonitor(JervletMonitor jervletMonitor) {
- this.monitor = jervletMonitor;
- }
-
-
- public void initialize() throws UnknownHostException {
-
- this.jervletContext = new SimpleJervletContext();
-
- m_server = createHttpServer();
- m_server.addListener( createSocketListener() );
-
- m_server.setRequestLog( new JettyRequestLogAdapter( requestLogger ) );
- }
-
- public void dispose() {
-
- }
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder ) throws JervletException
- {
- deploy( context, pathToWebAppFolder, jervletContext );
- }
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @param jervletContext The optional jervletContext to use to resolve dependancies for servlets
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder, JervletContext jervletContext )
- throws JervletException
- {
- if( m_webcontexts.containsKey( context ) )
- {
- throw new JervletException( "Context '" + context + "' has already been deployed" );
- }
-
- WebApplicationContextHolder holder;
-
- try
- {
- holder = new WebApplicationContextHolder( context,
- pathToWebAppFolder,
- jervletContext,
- appRootDir,
- config.getExtractWarFile() );
- m_webcontexts.put( context, holder );
- }
- catch( Exception e )
- {
- final String msg = "Problem deploying web application (" + pathToWebAppFolder
- + ") in Jetty";
-
- throw new JervletException( msg, e );
- }
-
- deploy( context );
- }
-
- /**
- * Get a list of all webapps currently installed with the container
- *
- * @phoenix:mx-attribute
- *
- * @return The list of all contexts installed in the container
- */
- public Set getContextList()
- {
- return Collections.unmodifiableSet( m_webcontexts.keySet() );
- }
-
- /**
- * Get the status of an installed webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to get status of
- * @return status of webapp
- * @throws JervletException if any problems occur
- */
- public String getStatus( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- return holder.getStatus();
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void start( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.start();
- }
- catch( Exception e )
- {
-
- monitor.startException(this.getClass(),context,e);
- }
- }
-
- /**
- * Stop a running webapp
- *
- *
- * @param context webapp to stop
- * @throws JervletException if any problems occur
- */
- public void stop( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( Exception e )
- {
- monitor.stopException(this.getClass(), context,e);
- }
- }
-
- /**
- * Redeploy a webapp. This operation fully reloads the webapp, and is equivalent to
- * doing undeploy() followed by deploy()
- * *
- * @param context webapp to reload
- * @throws JervletException if any problems occur
- */
- public void redeploy( String context ) throws JervletException
- {
- try
- {
- undeploy( context );
- deploy( context );
- }
- catch( JervletException e )
- {
- monitor.redeployException(this.getClass(), context,e);
- }
- }
-
- /**
- * Deploy a webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to deploy
- * @throws JervletException if any problems occur
- */
- public void deploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- //Set the context classloader because the current classloader will be that of the
- Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
-
- try
- {
- m_server.addContext( config.getHostName(), holder.create() );
-
- monitor.deployingContext(this.getClass(), context, holder.getWebappUrl(), config.getHostName());
-
- holder.start();
- }
- catch( Exception e )
- {
-
- monitor.deployingException(this.getClass(), context, holder.getWebappUrl(), config.getHostName(), e);
-
- }
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void undeploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( InterruptedException e )
- {
-
- monitor.undeployException(this.getClass(), context, e);
-
- }
-
- if( !m_server.removeContext( holder.getWebApplicationContext() ) )
- {
- monitor.undeployWarning(this.getClass(), context, "Context Not Removed");
- }
-
- try
- {
- holder.destroy();
- }
- catch( Exception e )
- {
- monitor.undeployException(this.getClass(), context, e);
-
- }
- }
-
- /**
- * Start
- */
- public final void start()
- {
- try
- {
- m_server.start();
- }
- catch( MultiException e )
- {
- throw new CascadingRuntimeException( "Some problem starting Jetty", e );
- }
- }
-
- /**
- * Stop
- */
- public final void stop()
- {
- try
- {
- m_server.stop();
- }
- catch( InterruptedException e )
- {
- throw new CascadingRuntimeException( "Some problem stopping Jetty", e );
- }
- }
-}
-
-
-
</pre></div>
<hr /><a name="file39" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>CommonsLoggingLogSink.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N CommonsLoggingLogSink.java
--- CommonsLoggingLogSink.java 6 Nov 2003 22:06:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,117 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.apache.commons.logging.LogFactory;
-import org.mortbay.util.Frame;
-import org.mortbay.util.Log;
-
-/**
- * Jetty Log redirection
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Bruno Dumon & Paul Hammant
- * @version 1.0
- */
-public class CommonsLoggingLogSink extends SimpleLogSink
-{
-
- private org.apache.commons.logging.Log log = LogFactory.getFactory().getInstance(CommonsLoggingLogSink.class);
-
- /**
- * Log something
- * @param type the type of message
- * @param message the message
- * @param frame the frame
- * @param time the time
- */
- public void log( String type, Object message, Frame frame, long time )
- {
-
- if( type.equals( Log.DEBUG ) )
- {
- if( log.isDebugEnabled() )
- log.debug( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.FAIL ) )
- {
- if( log.isErrorEnabled() )
- log.error( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.WARN ) )
- {
- if( log.isWarnEnabled() )
- log.warn( "time=" + time + " message=" + message + " frame=" + frame );
- }
- else if( type.equals( Log.ASSERT ) )
- {
- if( log.isInfoEnabled() )
- log.info( "ASSERT time=" + time + " message=" + message + " frame=" + frame );
- }
- else
- {
- log.info( "time=" + time + " message=" + message + " frame=" + frame );
- }
- }
-
-
- /**
- * Log a message
- * @param message the Message
- */
- public void log( String message )
- {
- log.info( message );
- }
-
-
-}
</pre></div>
<hr /><a name="file40" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>JervletServletHolder.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N JervletServletHolder.java
--- JervletServletHolder.java 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,109 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.jcomponent.jervlet.JervletContext;
-import org.mortbay.jetty.servlet.ServletHolder;
-
-/**
- *
- * Override for Jetty's ServletHolder allow custom servlet handling
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @version 1.0
- */
-class JervletServletHolder extends ServletHolder
-{
- private JervletContext m_jervletContext;
-
- /**
- * Construct a Servlet Holder
- * @param jervletContext the context that is applied to the servlet on instantiation.
- * @param handler the handler
- * @param name the name
- * @param className the class name
- * @param forcedPath the forced path
- */
- public JervletServletHolder( JervletContext jervletContext,
- JervletWebApplicationHandler handler,
- String name,
- String className,
- String forcedPath )
- {
- // this constructor public or protected...
- super( handler, name, className, forcedPath );
- m_jervletContext = jervletContext;
- }
-
- /**
- * Create a new instance of a servlet, currently applying the following lifecycle:
- * If a servlet is Servicable then the serviceManager is set on the servlet.
- * If a servlet is LogEnabled then the logger is set on the servlet.
- * If a servlet is Initializable then the initialize method is invoked.
- * @return the instance
- * @throws InstantiationException if a prob
- * @throws IllegalAccessException if a prob
- */
- public synchronized Object newInstance() throws InstantiationException, IllegalAccessException
- {
- if( _class == null )
- {
- throw new InstantiationException( "No class for " + this );
- }
- else
- {
- return m_jervletContext.instantiate(_class);
-
- }
- }
-}
</pre></div>
<hr /><a name="file41" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>JervletWebApplicationContext.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JervletWebApplicationContext.java
--- JervletWebApplicationContext.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,98 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import java.io.File;
-import java.io.IOException;
-import org.jcomponent.jervlet.JervletContext;
-import org.mortbay.jetty.servlet.WebApplicationContext;
-
-/**
- *
- * Override for Jetty's WebApplicationContext to kludge Jasper JSP compilation ability.
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @author Jules Gosnell
- * @version 1.0
- */
-class JervletWebApplicationContext extends WebApplicationContext
-{
- private File m_sarRoot;
- private File m_phoenixLib;
- private JervletContext m_jervletContext;
-
- public JervletWebApplicationContext( JervletContext jervletContext, File sarRoot, String webAppURL )
- throws IOException
- {
- super( webAppURL );
- m_sarRoot = sarRoot;
- m_phoenixLib = new File( sarRoot.getParentFile().getParentFile(), "lib" );
- m_jervletContext = jervletContext;
-
- addHandler( 0, new JervletWebApplicationHandler( m_jervletContext ) );
- }
-
- /**
- * Make a classpath for Jasper to use during compilation. This is minimalist
- * @return the classpath.
- */
- public String getFileClassPath()
- {
- String classpath = "";
- classpath += new File( m_sarRoot, "jsplibs" + File.separator + "jasper-runtime.jar" ) + File.pathSeparator;
- classpath += new File( m_sarRoot, "jsplibs" + File.separator + "jasper-compile.jar" ) + File.pathSeparator;
- classpath += new File( m_sarRoot, "jsplibs" + File.separator + "javax.servlet.jar" ) + File.pathSeparator;
- classpath += new File( m_phoenixLib, "tools.jar" );
- return classpath;
- }
-}
</pre></div>
<hr /><a name="file42" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>JervletWebApplicationHandler.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JervletWebApplicationHandler.java
--- JervletWebApplicationHandler.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.jcomponent.jervlet.JervletContext;
-import org.mortbay.jetty.servlet.ServletHolder;
-import org.mortbay.jetty.servlet.WebApplicationHandler;
-
-/**
- *
- * Override for Jetty's WebApplicationHandler allow custom servlet handling
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @version 1.0
- */
-class JervletWebApplicationHandler extends WebApplicationHandler
-{
-
- private JervletContext m_jervletContext;
-
- public JervletWebApplicationHandler( JervletContext jervletContext )
- {
- m_jervletContext = jervletContext;
- }
-
- public ServletHolder newServletHolder( String name, String servletClass, String forcedPath )
- {
- if( _nameMap.containsKey( name ) )
- {
- throw new IllegalArgumentException( "Named servlet already exists: " + name );
- }
- else
- {
- ServletHolder holder = new JervletServletHolder( m_jervletContext, this, name, servletClass, forcedPath );
- _nameMap.put( holder.getName(), holder );
- return holder;
- }
- }
-}
</pre></div>
<hr /><a name="file43" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>JettyJervlet.java</b></big> <small id="info">removed after 1.2</small></div>
<pre class="diff"><small id="info">diff -N JettyJervlet.java
--- JettyJervlet.java 6 Nov 2003 20:25:46 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,75 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-/**
- * @phoenix:block
- * @phoenix:service name="org.jcomponent.jervlet.Jervlet"
- * @phoenix:mx-topic name="ServletContainer"
- *
- * Jetty Wrapper.
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @deprecated Use AvalonJettyJervlet instead.
- * @author Paul Hammant
- * @author Ulrich Mayring
- * @author Peter Royal
- * @author Ryan Hoegg
- * @version 1.0
- */
-public class JettyJervlet extends AvalonJettyJervlet
-{
-
-}
-
-
-
</pre></div>
<hr /><a name="file44" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>JettyRequestLogAdapter.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N JettyRequestLogAdapter.java
--- JettyRequestLogAdapter.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,89 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-import org.mortbay.http.RequestLog;
-
-/**
- * Adapts RequestLogger to Jetty RequestLog. Adapter provides empty
- * implementations of org.mortbay.util.LifeCycle methods. They are not
- * needed for our component that has its lifecycle managed in Avalon
- * container.
- */
-public class JettyRequestLogAdapter implements RequestLog
-{
- private final RequestLogger m_logger;
-
- public JettyRequestLogAdapter( RequestLogger logger )
- {
- m_logger = logger;
- }
-
- public final void log( HttpRequest request, HttpResponse response,
- int responseLength )
- {
- m_logger.log( request, response, responseLength );
- }
-
- public void start()
- {
- }
-
- public void stop()
- {
- }
-
- public boolean isStarted()
- {
- return true;
- }
-}
</pre></div>
<hr /><a name="file45" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>NCSARequestLogger.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N NCSARequestLogger.java
--- NCSARequestLogger.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,148 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import java.util.Locale;
-import java.util.TimeZone;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-import org.mortbay.util.DateCache;
-
-/**
- * Logs request information in NCSA (== apache httpd) format. The
- * contents of log() method was copied with permission from
- * org.mortbay.http.NCSARequestLog.log.
- *
- * @phoenix:block
- * @phoenix:service name="org.jcomponent.jervlet.blocks.jetty.RequestLogger"
- */
-public class NCSARequestLogger extends AbstractLogEnabled
- implements Initializable, RequestLogger
-{
- /**
- * Timestamp format used by NCSA log is fixed. So it is not
- * configurable.
- */
- private final static String m_logDateFormat = "dd/MMM/yyyy:HH:mm:ss ZZZ";
- private DateCache m_dateCache;
-
- /**
- * Logs information about a single HTTP transaction after the
- * fact.
- *
- * @param request that was processed
- * @param response that was returned
- * @param responseLength number of octets sent in response
- */
- public void log( HttpRequest request, HttpResponse response, int responseLength )
- {
- if( getLogger().isInfoEnabled() )
- {
- StringBuffer buf = new StringBuffer( 160 );
-
- buf.append( request.getRemoteAddr() );
- buf.append( " - " );
-
- String user = request.getAuthUser();
- buf.append( ( user == null ) ? "-" : user );
- buf.append( " [" );
- buf.append( m_dateCache.format( request.getTimeStamp() ) );
- buf.append( "] \"" );
- buf.append( request.getMethod() );
- buf.append( ' ' );
- buf.append( request.getURI() );
- buf.append( ' ' );
- buf.append( request.getVersion() );
- buf.append( "\" " );
-
- int status = response.getStatus();
- buf.append( (char)( '0' + ( ( status / 100 ) % 10 ) ) );
- buf.append( (char)( '0' + ( ( status / 10 ) % 10 ) ) );
- buf.append( (char)( '0' + ( status % 10 ) ) );
-
- if( responseLength >= 0 )
- {
- buf.append( ' ' );
-
- if( responseLength > 99999 )
- {
- buf.append( Integer.toString( responseLength ) );
- }
- else
- {
- if( responseLength > 9999 )
- buf.append( (char)( '0' + ( ( responseLength / 10000 ) % 10 ) ) );
- if( responseLength > 999 )
- buf.append( (char)( '0' + ( ( responseLength / 1000 ) % 10 ) ) );
- if( responseLength > 99 )
- buf.append( (char)( '0' + ( ( responseLength / 100 ) % 10 ) ) );
- if( responseLength > 9 )
- buf.append( (char)( '0' + ( ( responseLength / 10 ) % 10 ) ) );
- buf.append( (char)( '0' + ( responseLength % 10 ) ) );
- }
- buf.append( ' ' );
- }
- else
- {
- buf.append( " - " );
- }
-
- getLogger().info( buf.toString() );
- }
- }
-
- public void initialize() throws Exception
- {
- m_dateCache = new DateCache( m_logDateFormat, Locale.US );
- m_dateCache.setTimeZoneID( TimeZone.getDefault().getID() );
- }
-}
</pre></div>
<hr /><a name="file46" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>NullRequestLogger.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N NullRequestLogger.java
--- NullRequestLogger.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,68 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-
-/**
- * Ignores logging requests. To be used when request logging is not
- * necessary or performance is so critical that request logging is in
- * the way.
- *
- * @phoenix:block
- * @phoenix:service name="org.jcomponent.jervlet.blocks.jetty.RequestLogger"
- */
-public class NullRequestLogger implements RequestLogger
-{
- public void log( HttpRequest request, HttpResponse response, int responseLength )
- {
- }
-}
</pre></div>
<hr /><a name="file47" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>PicoJettyJervlet.java</b></big> <small id="info">removed after 1.4</small></div>
<pre class="diff"><small id="info">diff -N PicoJettyJervlet.java
--- PicoJettyJervlet.java 19 Jun 2004 14:39:02 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,346 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.jcomponent.jervlet.*;
-import org.mortbay.jetty.Server;
-import org.mortbay.util.MultiException;
-import org.picocontainer.MutablePicoContainer;
-import org.picocontainer.Disposable;
-import org.picocontainer.Startable;
-
-import java.io.File;
-import java.net.UnknownHostException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Set;
-
-/**
- *
- * Jetty Wrapper for PicoContainer etc
- * Type-3 IoC
- *
- *
- * @see <a href="http://jetty.mortbay.com/">Jetty Project Page</a>
- *
- * @author Paul Hammant
- * @author Ulrich Mayring
- * @author Peter Royal
- * @author Ryan Hoegg
- * @version 1.0
- */
-public class PicoJettyJervlet extends AbstractJettyJervlet
- implements Jervlet, Startable
-{
- private final JervletMonitor monitor;
- private final File appRootDir;
- private final JervletContext jervletContext;
-
- private Server m_server;
-
- private HashMap m_webcontexts = new HashMap();
-
- public PicoJettyJervlet(JervletConfig config, JervletMonitor monitor, MutablePicoContainer parentContainer,
- File appRootDir, RequestLogger requestLogger) throws UnknownHostException {
- super.config = config;
- this.monitor = monitor;
- this.appRootDir = appRootDir;
- this.jervletContext = new PicoJervletContext(parentContainer);
-
- m_server = createHttpServer();
- m_server.addListener( createSocketListener() );
-
- m_server.setRequestLog( new JettyRequestLogAdapter( requestLogger ) );
- }
-
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder ) throws JervletException
- {
- deploy( context, pathToWebAppFolder, jervletContext );
- }
-
- /**
- * Deploy a webapp
- * @param context the contxct for the webapp
- * @param pathToWebAppFolder the path to it
- * @param jervletContext The optional jervletContext to use to resolve dependancies for servlets
- * @throws JervletException if a problem
- */
- public void deploy( String context, File pathToWebAppFolder, JervletContext jervletContext )
- throws JervletException
- {
- if( m_webcontexts.containsKey( context ) )
- {
- throw new JervletException( "Context '" + context + "' has already been deployed" );
- }
-
- WebApplicationContextHolder holder;
-
- try
- {
- holder = new WebApplicationContextHolder( context,
- pathToWebAppFolder,
- jervletContext,
- appRootDir,
- config.getExtractWarFile() );
- m_webcontexts.put( context, holder );
- }
- catch( Exception e )
- {
- final String msg = "Problem deploying web application (" + pathToWebAppFolder
- + ") in Jetty";
-
- throw new JervletException( msg, e );
- }
-
- deploy( context );
- }
-
- /**
- * Get a list of all webapps currently installed with the container
- *
- * @phoenix:mx-attribute
- *
- * @return The list of all contexts installed in the container
- */
- public Set getContextList()
- {
- return Collections.unmodifiableSet( m_webcontexts.keySet() );
- }
-
- /**
- * Get the status of an installed webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to get status of
- * @return status of webapp
- * @throws JervletException if any problems occur
- */
- public String getStatus( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- return holder.getStatus();
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void start( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.start();
- }
- catch( Exception e )
- {
-
- monitor.startException(this.getClass(),context,e);
- }
- }
-
- /**
- * Stop a running webapp
- *
- *
- * @param context webapp to stop
- * @throws JervletException if any problems occur
- */
- public void stop( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( Exception e )
- {
- monitor.stopException(this.getClass(), context,e);
- }
- }
-
- /**
- * Redeploy a webapp. This operation fully reloads the webapp, and is equivalent to
- * doing undeploy() followed by deploy()
- * *
- * @param context webapp to reload
- * @throws JervletException if any problems occur
- */
- public void redeploy( String context ) throws JervletException
- {
- try
- {
- undeploy( context );
- deploy( context );
- }
- catch( JervletException e )
- {
- monitor.redeployException(this.getClass(), context,e);
- }
- }
-
- /**
- * Deploy a webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to deploy
- * @throws JervletException if any problems occur
- */
- public void deploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- //Set the context classloader because the current classloader will be that of the
- Thread.currentThread().setContextClassLoader( getClass().getClassLoader() );
-
- try
- {
- m_server.addContext( config.getHostName(), holder.create() );
-
- monitor.deployingContext(this.getClass(), context, holder.getWebappUrl(), config.getHostName());
-
- holder.start();
- }
- catch( Exception e )
- {
-
- monitor.deployingException(this.getClass(), context, holder.getWebappUrl(), config.getHostName(), e);
-
- }
- }
-
- /**
- * Start a stopped webapp
- *
- * @phoenix:mx-operation
- *
- * @param context webapp to start
- * @throws JervletException if any problems occur
- */
- public void undeploy( String context ) throws JervletException
- {
- final WebApplicationContextHolder holder = getWebApplicationContextHolder( context );
-
- try
- {
- holder.stop();
- }
- catch( InterruptedException e )
- {
-
- monitor.undeployException(this.getClass(), context, e);
-
- }
-
- if( !m_server.removeContext( holder.getWebApplicationContext() ) )
- {
- monitor.undeployWarning(this.getClass(), context, "Context Not Removed");
- }
-
- try
- {
- holder.destroy();
- }
- catch( Exception e )
- {
- monitor.undeployException(this.getClass(), context, e);
-
- }
- }
-
- /**
- * Start
- */
- public final void start()
- {
- try
- {
- m_server.start();
- }
- catch( MultiException e )
- {
- throw new PicoStartableException( "Some problem starting Jetty", e );
- }
- }
-
- /**
- * Stop
- */
- public final void stop()
- {
- try
- {
- m_server.stop();
- }
- catch( InterruptedException e )
- {
- throw new PicoStartableException( "Some problem stopping Jetty", e );
- }
- }
-}
-
-
-
</pre></div>
<hr /><a name="file48" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>PicoStartableException.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N PicoStartableException.java
--- PicoStartableException.java 19 Jun 2004 14:39:02 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,61 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
-============================================================================
- The Spice Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 1999-2003 The Spice Group. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Spice Group (http://spice.codehaus.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Spice" and "Spice Group" must not be used to endorse or
- promote products derived from this software without prior written
- permission. For written permission, please contact [email protected]
-
- 5. Products derived from this software may not be called "Spice", nor
- may "Spice" appear in their name, without prior written permission
- of The Spice Group.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of The Spice Group. For more information on The Spice Group,
- please see <http://spice.codehaus.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.picocontainer.PicoException;
-
-/**
- * @author Paul Hammant
- * @version $Revision: 1.1 $
- */
-public class PicoStartableException extends PicoException {
- public PicoStartableException(String s, Throwable throwable) {
- super(s, throwable);
- }
-}
</pre></div>
<hr /><a name="file49" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>RequestLogger.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N RequestLogger.java
--- RequestLogger.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,71 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.mortbay.http.HttpRequest;
-import org.mortbay.http.HttpResponse;
-
-/**
- * Records information about HTTP transaction.
- */
-public interface RequestLogger
-{
- String ROLE = RequestLogger.class.getName();
-
- /**
- * Logs information about a single HTTP transaction after the
- * fact.
- *
- * @param request that was processed
- * @param response that was returned
- * @param responseLength number of octets sent in response
- */
- void log( HttpRequest request, HttpResponse response, int responseLength );
-}
</pre></div>
<hr /><a name="file50" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>SimpleLogSink.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N SimpleLogSink.java
--- SimpleLogSink.java 6 Nov 2003 22:06:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,55 +0,0 @@
</small></pre><pre class="diff" id="removed">-package org.jcomponent.jervlet.blocks.jetty;
-
-import org.mortbay.util.LogSink;
-import org.mortbay.util.Frame;
-
-public class SimpleLogSink implements LogSink {
-
- /**
- * Stop (unimpled)
- * @throws InterruptedException
- */
- public void stop() throws InterruptedException
- {
- }
-
- /**
- * Is this started (always)
- * @return
- */
- public boolean isStarted()
- {
- return true;
- }
-
- /**
- * Set Options (un implemented)
- * @param s the options
- */
- public void setOptions( String s )
- {
- }
-
- /**
- * Get Option (unimplemented)
- * @return the options
- */
- public String getOptions()
- {
- return "";
- }
-
- /**
- * Start a logger (unimpled)
- * @throws Exception
- */
- public void start() throws Exception
- {
- }
-
- public void log(String string) {
- }
-
- public void log(String string, Object object, Frame frame, long l) {
- }
-}
</pre></div>
<hr /><a name="file51" /><div class="file">
<span class="pathname" id="removed">spice/sandbox/jervlet/jervlet-jetty/src/java/org/jcomponent/jervlet/blocks/jetty<br /></span>
<div class="fileheader" id="removed"><big><b>WebApplicationContextHolder.java</b></big> <small id="info">removed after 1.1</small></div>
<pre class="diff"><small id="info">diff -N WebApplicationContextHolder.java
--- WebApplicationContextHolder.java 28 Oct 2003 05:07:35 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,173 +0,0 @@
</small></pre><pre class="diff" id="removed">-/*
-
- ============================================================================
- The Apache Software License, Version 1.1
- ============================================================================
-
- Copyright (C) 2002,2003 The Apache Software Foundation. All rights reserved.
-
- Redistribution and use in source and binary forms, with or without modifica-
- tion, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- 3. The end-user documentation included with the redistribution, if any, must
- include the following acknowledgment: "This product includes software
- developed by the Apache Software Foundation (http://www.apache.org/)."
- Alternately, this acknowledgment may appear in the software itself, if
- and wherever such third-party acknowledgments normally appear.
-
- 4. The names "Jakarta", "Avalon", "Excalibur" and "Apache Software Foundation"
- must not be used to endorse or promote products derived from this software
- without prior written permission. For written permission, please contact
- [email protected]
-
- 5. Products derived from this software may not be called "Apache", nor may
- "Apache" appear in their name, without prior written permission of the
- Apache Software Foundation.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
- DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This software consists of voluntary contributions made by many individuals
- on behalf of the Apache Software Foundation. For more information on the
- Apache Software Foundation, please see <http://www.apache.org/>.
-
-*/
-package org.jcomponent.jervlet.blocks.jetty;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-
-import org.jcomponent.jervlet.JervletContext;
-
-import org.mortbay.jetty.servlet.WebApplicationContext;
-
-/**
- * Class to hold a WebApplicationContext in Jetty
- *
- * @author <a href="[email protected]">peter royal</a>
- */
-class WebApplicationContextHolder
-{
- private final String m_context;
- private final String m_webappUrl;
- private final JervletContext m_jervletContext;
- private final File m_rootDirectory;
- private boolean m_extractWebArchive;
-
- private WebApplicationContext m_webApplicationContext;
-
- public WebApplicationContextHolder( String context,
- File pathToWebAppFolder,
- JervletContext jervletContext,
- File rootDirectory,
- boolean extractWebArchive )
- throws MalformedURLException
- {
- m_context = context;
- m_webappUrl = pathToWebAppFolder.toURL().toString();
- m_jervletContext = jervletContext;
- m_rootDirectory = rootDirectory;
- m_extractWebArchive = extractWebArchive;
- }
-
- String getWebappUrl()
- {
- return m_webappUrl;
- }
-
- String getContext()
- {
- return m_context;
- }
-
- WebApplicationContext getWebApplicationContext()
- {
- return m_webApplicationContext;
- }
-
- String getStatus()
- {
- if( null == m_webApplicationContext )
- {
- return "Ready to deploy";
- }
- else if( m_webApplicationContext.isStarted() )
- {
- return "Running";
- }
- else
- {
- return "Stopped";
- }
- }
-
- WebApplicationContext create() throws IOException
- {
- if( null != m_webApplicationContext )
- {
- throw new IllegalStateException( "context already exists" );
- }
-
- m_webApplicationContext =
- new JervletWebApplicationContext( m_jervletContext, m_rootDirectory, m_webappUrl );
- m_webApplicationContext.setContextPath( m_context );
- m_webApplicationContext.setExtractWAR( m_extractWebArchive );
-
- return m_webApplicationContext;
- }
-
- void start() throws Exception
- {
- if( m_webApplicationContext == null )
- {
- throw new IllegalStateException( "haven't been created");
- }
- else if ( m_webApplicationContext.isStarted() )
- {
- throw new IllegalStateException( "already started" );
- }
-
- m_webApplicationContext.start();
- }
-
- void stop() throws InterruptedException
- {
- if( m_webApplicationContext == null || !m_webApplicationContext.isStarted() )
- {
- throw new IllegalStateException( "not started");
- }
-
- m_webApplicationContext.stop();
- }
-
- void destroy()
- {
- if( m_webApplicationContext == null )
- {
- throw new IllegalStateException( "already destroyed");
- }
- else if( m_webApplicationContext.isStarted() )
- {
- throw new IllegalStateException( "must stop before destroying ");
- }
-
- m_webApplicationContext.destroy();
- m_webApplicationContext = null;
- }
-}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.8</small></center>
</body></html>