338819 backed out for release

git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2860 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
Greg Wilkins 2011-03-07 04:21:25 +00:00
parent f3f84e7d2a
commit bdc1aa6c24
7 changed files with 9 additions and 106 deletions

View File

@ -22,7 +22,6 @@ jetty-7.3.1.v20110307 7 March 2011
+ 338068 Leaking ConstraintMappings on redeploy
+ 338092 ProxyServlet leaks memory
+ 338607 Removed managed attributes when context is stopped
+ 338819 Externally control Deployment Manager application lifecycle
+ 338880 Fixed failing buffer range checks
+ 338920 Handle non existent real path directories
+ JETTY-1304 Allow quoted boundaries in Multipart filter

View File

@ -95,7 +95,6 @@
<dependency>
<groupId>org.eclipse.jetty.toolchain</groupId>
<artifactId>jetty-test-helper</artifactId>
<version>1.3-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>

View File

@ -35,6 +35,7 @@ import org.eclipse.jetty.deploy.graph.Path;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.util.AttributesMap;
import org.eclipse.jetty.util.component.AbstractLifeCycle;
import org.eclipse.jetty.util.component.AggregateLifeCycle;
import org.eclipse.jetty.util.log.Log;
@ -434,10 +435,10 @@ public class DeploymentManager extends AggregateLifeCycle
public void requestAppGoal(App app, String nodeName)
{
AppEntry appentry = findAppByOriginId(app.getOriginId());
if (appentry == null)
{
throw new IllegalStateException("App not being tracked by Deployment Manager: " + app);
}
if (appentry == null)
{
throw new IllegalStateException("App not being tracked by Deployment Manager: " + app);
}
requestAppGoal(appentry,nodeName);
}
@ -454,10 +455,6 @@ public class DeploymentManager extends AggregateLifeCycle
private void requestAppGoal(AppEntry appentry, String nodeName)
{
Node destinationNode = _lifecycle.getNodeByName(nodeName);
if (destinationNode == null)
{
throw new IllegalStateException("Node not present in Deployment Manager: " + nodeName);
}
// Compute lifecycle steps
Path path = _lifecycle.getPath(appentry.lifecyleNode,destinationNode);
if (path.isEmpty())
@ -566,14 +563,4 @@ public class DeploymentManager extends AggregateLifeCycle
{
this._useStandardBindings = useStandardBindings;
}
public Collection<Node> getNodes()
{
return _lifecycle.getNodes();
}
public Collection<App> getApps(String nodeName)
{
return getApps(_lifecycle.getNodeByName(nodeName));
}
}

View File

@ -7,7 +7,6 @@ import java.util.List;
import org.eclipse.jetty.deploy.App;
import org.eclipse.jetty.deploy.AppProvider;
import org.eclipse.jetty.deploy.DeploymentManager;
import org.eclipse.jetty.deploy.graph.Node;
import org.eclipse.jetty.jmx.ObjectMBean;
import org.eclipse.jetty.server.handler.ContextHandler;
@ -21,14 +20,6 @@ public class DeploymentManagerMBean extends ObjectMBean
_manager=(DeploymentManager)managedObject;
}
public Collection<String> getNodes()
{
List<String> nodes = new ArrayList<String>();
for (Node node: _manager.getNodes())
nodes.add(node.getName());
return nodes;
}
public Collection<String> getApps()
{
List<String> apps=new ArrayList<String>();
@ -37,14 +28,6 @@ public class DeploymentManagerMBean extends ObjectMBean
return apps;
}
public Collection<String> getApps(String nodeName)
{
List<String> apps=new ArrayList<String>();
for (App app: _manager.getApps(nodeName))
apps.add(app.getOriginId());
return apps;
}
public Collection<ContextHandler> getContexts() throws Exception
{
List<ContextHandler> apps=new ArrayList<ContextHandler>();
@ -57,9 +40,4 @@ public class DeploymentManagerMBean extends ObjectMBean
{
return _manager.getAppProviders();
}
public void requestAppGoal(String appId, String nodeName)
{
_manager.requestAppGoal(appId, nodeName);
}
}

View File

@ -1,10 +1,4 @@
DeploymentManager: Deployment Manager
nodes:MBean: App LifeCycle Nodes
apps:MBean: Deployed Apps
contexts:MMBean: Deployed Contexts
appProviders:MMBean: Application Providers
getApps(java.lang.String):MBean:ACTION: List apps that are located at specified App LifeCycle node
getApps(java.lang.String)[0]:nodeName: Name of the App LifeCycle node
requestAppGoal(java.lang.String,java.lang.String) ACTION: Request the app to be moved to the specified App LifeCycle node
requestAppGoal(java.lang.String,java.lang.String)[0]:appId:App identifier
requestAppGoal(java.lang.String,java.lang.String)[1]:nodeName:Name of the App LifeCycle node
apps:MBean:Deployed Apps
contexts:MMBean:Deployed Contexts
appProviders:MMBean:Application Providers

View File

@ -1,6 +1,6 @@
WebAppDeployer: Deployer for startup deployment of webapps
contexts: MObject: The ContextHandlerCollection to which the deployer deploys
allowDuplicates: Object:RO: Whether or not duplicate deployments are allowed
allowDuplicates: Object:R0: Whether or not duplicate deployments are allowed
setAllowDuplicates(boolean):ACTION: Whether or not duplicate deployments are allowed
setAllowDuplicates(boolean)[0]:allowDuplicates: True allows duplicate webapps to be deployed while false does not
defaultsDescriptor: Object: The webdefault.xml descriptor to use for all webapps deployed by the deployer

View File

@ -15,16 +15,10 @@
// ========================================================================
package org.eclipse.jetty.deploy;
import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.List;
import javax.management.MBeanServerConnection;
import javax.management.ObjectName;
import org.eclipse.jetty.jmx.MBeanContainer;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.toolchain.jmx.JmxServiceConnection;
import org.junit.Test;
public class DeploymentManagerLifeCyclePathTest
@ -85,52 +79,4 @@ public class DeploymentManagerLifeCyclePathTest
pathtracker.assertExpected("Test StateTransition / New only",expected);
}
@Test
public void testStateTransition_DeployedToUndeployed() throws Exception
{
DeploymentManager depman = new DeploymentManager();
depman.setDefaultLifeCycleGoal(null); // no default
AppLifeCyclePathCollector pathtracker = new AppLifeCyclePathCollector();
MockAppProvider mockProvider = new MockAppProvider();
// Setup JMX
MBeanContainer mbContainer=new MBeanContainer(ManagementFactory.getPlatformMBeanServer());
mbContainer.start();
mbContainer.addBean(depman);
depman.addLifeCycleBinding(pathtracker);
depman.addAppProvider(mockProvider);
depman.setContexts(new ContextHandlerCollection());
// Start DepMan
depman.start();
// Trigger new App
mockProvider.findWebapp("foo-webapp-1.war");
App app = depman.getAppByOriginId("mock-foo-webapp-1.war");
// Request Deploy of App
depman.requestAppGoal(app,"deployed");
JmxServiceConnection jmxConnection = new JmxServiceConnection();
jmxConnection.connect();
MBeanServerConnection mbsConnection = jmxConnection.getConnection();
ObjectName dmObjName = new ObjectName("org.eclipse.jetty.deploy:type=deploymentmanager,id=0");
String[] params = new String[] {"mock-foo-webapp-1.war", "undeployed"};
String[] signature = new String[] {"java.lang.String", "java.lang.String"};
mbsConnection.invoke(dmObjName, "requestAppGoal", params, signature);
// Setup Expectations.
List<String> expected = new ArrayList<String>();
// SHOULD NOT SEE THIS NODE VISITED - expected.add("undeployed");
expected.add("deploying");
expected.add("deployed");
expected.add("undeploying");
expected.add("undeployed");
pathtracker.assertExpected("Test JMX StateTransition / Deployed -> Undeployed",expected);
}
}