Adding Jetty DeploymentManager to jetty.xml as default deployer with

standard configuration to mimic the legacy deployer behavior.

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1131 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Joakim Erdfelt 2009-12-07 20:39:49 +00:00
parent c5a6e8a8fd
commit 3e91339db5
2 changed files with 59 additions and 7 deletions

View File

@ -322,7 +322,7 @@ public class DeploymentManager extends AbstractLifeCycle
* @param name
* @return
*/
public Object getAttribute(String name)
public Object getContextAttribute(String name)
{
return contextAttributes.getAttribute(name);
}
@ -399,7 +399,7 @@ public class DeploymentManager extends AbstractLifeCycle
*
* @param name
*/
public void removeAttribute(String name)
public void removeContextAttribute(String name)
{
contextAttributes.removeAttribute(name);
}
@ -500,7 +500,7 @@ public class DeploymentManager extends AbstractLifeCycle
* @param name
* @param value
*/
public void setAttribute(String name, Object value)
public void setContextAttribute(String name, Object value)
{
contextAttributes.setAttribute(name,value);
}

View File

@ -93,7 +93,55 @@
</Set>
</New>
</Set>
<!-- =========================================================== -->
<!-- Configure the deployment manager -->
<!-- -->
<!-- Sets up 2 monitored dir app providers that are configured -->
<!-- to behave in a similaraly to the legacy ContextDeployer -->
<!-- and WebAppDeployer from previous versions of Jetty. -->
<!-- =========================================================== -->
<Call name="addBean">
<Arg>
<New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
<Set name="contexts">
<Ref id="Contexts" />
</Set>
<Call name="setContextAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/jsp-api-[^/]*\.jar$|.*/jsp-[^/]*\.jar$</Arg>
</Call>
<!-- Providers of Apps via Context XML files.
Configured to behave similar to the legacy ContextDeployer -->
<Call name="addAppProvider">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.MonitoredDirAppProvider">
<Set name="monitoredDir"><Property name="jetty.home" default="." />/contexts</Set>
<Set name="acceptContextXmlFiles">true</Set>
<Set name="acceptWarFiles">false</Set>
<Set name="scanInterval">5</Set>
<Set name="recursive">false</Set>
</New>
</Arg>
</Call>
<!-- Providers of Apps via WAR file existence.
Configured to behave similar to the legacy WebAppDeployer -->
<Call name="addAppProvider">
<Arg>
<New class="org.eclipse.jetty.deploy.providers.MonitoredDirAppProvider">
<Set name="monitoredDir"><Property name="jetty.home" default="." />/webapps</Set>
<Set name="acceptContextXmlFiles">false</Set>
<Set name="acceptWarFiles">true</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="scanInterval">5</Set>
<Set name="recursive">false</Set>
</New>
</Arg>
</Call>
</New>
</Arg>
</Call>
<!-- =========================================================== -->
<!-- Configure the context deployer -->
<!-- A context deployer will deploy contexts described in -->
@ -105,6 +153,7 @@
<!-- in the $JETTY_HOME/contexts directory -->
<!-- -->
<!-- =========================================================== -->
<!--
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.deploy.ContextDeployer">
@ -118,6 +167,7 @@
</New>
</Arg>
</Call>
-->
<!-- =========================================================== -->
<!-- Configure the webapp deployer. -->
@ -132,14 +182,15 @@
<!-- Normally only one type of deployer need be used. -->
<!-- -->
<!-- =========================================================== -->
<!--
<Call name="addBean">
<Arg>
<New class="org.eclipse.jetty.deploy.WebAppDeployer">
<Set name="contexts"><Ref id="Contexts"/></Set>
<Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
<Set name="parentLoaderPriority">false</Set>
<Set name="extract">true</Set>
<Set name="allowDuplicates">false</Set>
<Set name="parentLoaderPriority">false</Set>
<Set name="extract">true</Set>
<Set name="allowDuplicates">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
@ -148,6 +199,7 @@
</New>
</Arg>
</Call>
-->
<!-- =========================================================== -->
<!-- Configure Authentication Login Service -->