You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2013/12/06 14:06:26 UTC

git commit: Removing unnecessary activator from autoscaler

Updated Branches:
  refs/heads/master e2261ac96 -> 4c0241dec


Removing unnecessary activator from autoscaler


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/4c0241de
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/4c0241de
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/4c0241de

Branch: refs/heads/master
Commit: 4c0241decbb76325aee4ce6335aa1e9842698d9c
Parents: e2261ac
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Fri Dec 6 18:41:08 2013 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Fri Dec 6 18:41:08 2013 +0530

----------------------------------------------------------------------
 .../org.apache.stratos.autoscaler/pom.xml       |  3 -
 .../internal/AutoscalerActivator.java           | 66 --------------------
 2 files changed, 69 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4c0241de/components/org.apache.stratos.autoscaler/pom.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/pom.xml b/components/org.apache.stratos.autoscaler/pom.xml
index 479db8f..1a5bf83 100644
--- a/components/org.apache.stratos.autoscaler/pom.xml
+++ b/components/org.apache.stratos.autoscaler/pom.xml
@@ -181,9 +181,6 @@
 					<instructions>
 						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
 						<Bundle-Name>${project.artifactId}</Bundle-Name>
-						<Bundle-Activator>
-							org.apache.stratos.autoscaler.internal.AutoscalerActivator
-                        </Bundle-Activator>
                         <Private-Package>org.apache.stratos.autoscaler.internal.*</Private-Package>
 						<Export-Package>!org.apache.stratos.autoscaler.internal.*,org.apache.stratos.autoscaler.*</Export-Package>
 						<Import-Package>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/4c0241de/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerActivator.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerActivator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerActivator.java
deleted file mode 100644
index 3857842..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/internal/AutoscalerActivator.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one 
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
- * KIND, either express or implied.  See the License for the 
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.stratos.autoscaler.internal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.wso2.carbon.utils.CarbonUtils;
-
-/**
- * Activator for the Autoscaler  Bundle
- */
-public class AutoscalerActivator implements BundleActivator {
-	private static final Log log = LogFactory.getLog(AutoscalerActivator.class);
-
-	@Override
-	public void start(final BundleContext bundleContext) {
-
-		// If Carbon is running as a webapp within some other servlet container,
-		// then we should
-		// uninstall this component
-
-		if (!CarbonUtils.isRunningInStandaloneMode()) {
-
-			Thread th = new Thread() {
-				@Override
-				public void run() {
-					try {
-						bundleContext.getBundle().uninstall();
-					} catch (Throwable e) {
-						log.warn("Error occurred while uninstalling hosting.mgt UI bundle", e);
-					}
-				}
-			};
-			try {
-				th.join();
-			} catch (InterruptedException ignored) {
-			}
-			th.start();
-		}
-
-	}
-
-	@Override
-	public void stop(BundleContext bundleContext) {
-		// No implementation required for this method
-	}
-}