Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2012-09-21 01:45:51 +0000
committerGreg Wilkins2012-09-21 01:45:51 +0000
commit68ee346b8a4eeb38c8ef0277973b96ddc6b0bb72 (patch)
treed6a85e868fda781fd9c99d63a79a7b232cdcaaa5 /jetty-deploy/src
parent15804e76e2f0a168016e7d27245e06818fb68b92 (diff)
downloadorg.eclipse.jetty.project-68ee346b8a4eeb38c8ef0277973b96ddc6b0bb72.tar.gz
org.eclipse.jetty.project-68ee346b8a4eeb38c8ef0277973b96ddc6b0bb72.tar.xz
org.eclipse.jetty.project-68ee346b8a4eeb38c8ef0277973b96ddc6b0bb72.zip
jetty-9 combined the Container and AggregateLifeCycle into ContainerLifeCycle
Diffstat (limited to 'jetty-deploy/src')
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java17
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java3
-rw-r--r--jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderRuntimeUpdatesTest.java2
3 files changed, 7 insertions, 15 deletions
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
index 9cb3f86e49..4484cd37fe 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/DeploymentManager.java
@@ -42,7 +42,7 @@ import org.eclipse.jetty.util.annotation.ManagedAttribute;
import org.eclipse.jetty.util.annotation.ManagedObject;
import org.eclipse.jetty.util.annotation.ManagedOperation;
import org.eclipse.jetty.util.annotation.Name;
-import org.eclipse.jetty.util.component.AggregateLifeCycle;
+import org.eclipse.jetty.util.component.ContainerLifeCycle;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -61,7 +61,7 @@ import org.eclipse.jetty.util.log.Logger;
* <img src="doc-files/DeploymentManager.png">
*/
@ManagedObject("Deployment Manager")
-public class DeploymentManager extends AggregateLifeCycle
+public class DeploymentManager extends ContainerLifeCycle
{
private static final Logger LOG = Log.getLogger(DeploymentManager.class);
@@ -150,7 +150,7 @@ public class DeploymentManager extends AggregateLifeCycle
/* ------------------------------------------------------------ */
/** Set the AppProviders.
* The providers passed are added via {@link #addBean(Object)} so that
- * their lifecycles may be managed as a {@link AggregateLifeCycle}.
+ * their lifecycles may be managed as a {@link ContainerLifeCycle}.
* @param providers
*/
public void setAppProviders(Collection<AppProvider> providers)
@@ -175,11 +175,7 @@ public class DeploymentManager extends AggregateLifeCycle
{
if (isRunning())
throw new IllegalStateException();
-
- List<AppProvider> old = new ArrayList<AppProvider>(_providers);
- if (_providers.add(provider) && getServer()!=null)
- getServer().getContainer().update(this, null, provider, "provider");
-
+ _providers.add(provider);
addBean(provider);
}
@@ -417,11 +413,8 @@ public class DeploymentManager extends AggregateLifeCycle
public void removeAppProvider(AppProvider provider)
{
if(_providers.remove(provider))
- {
removeBean(provider);
- if (getServer()!=null)
- getServer().getContainer().update(this, provider,null, "provider");
- }
+
try
{
provider.stop();
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
index a5e6161839..c4eb14a5d5 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/DeploymentManagerLifeCyclePathTest.java
@@ -98,8 +98,7 @@ public class DeploymentManagerLifeCyclePathTest
// Setup JMX
MBeanContainer mbContainer=new MBeanContainer(ManagementFactory.getPlatformMBeanServer());
- mbContainer.start();
- mbContainer.addBean(depman);
+ depman.addBean(mbContainer);
depman.addLifeCycleBinding(pathtracker);
depman.addAppProvider(mockProvider);
diff --git a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderRuntimeUpdatesTest.java b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderRuntimeUpdatesTest.java
index 982907a7c7..3f314aa94f 100644
--- a/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderRuntimeUpdatesTest.java
+++ b/jetty-deploy/src/test/java/org/eclipse/jetty/deploy/providers/ScanningAppProviderRuntimeUpdatesTest.java
@@ -63,7 +63,7 @@ public class ScanningAppProviderRuntimeUpdatesTest
jetty.start();
// monitor tick
- DeploymentManager dm = jetty.getServer().getBeans(DeploymentManager.class).get(0);
+ DeploymentManager dm = jetty.getServer().getBean(DeploymentManager.class);
for (AppProvider provider : dm.getAppProviders())
{
if (provider instanceof ScanningAppProvider)

Back to the top