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/07/23 09:27:02 UTC

git commit: Renamed shell scripts wso2server.sh and wso2server.bat to stratos.sh and stratos.bat

Updated Branches:
  refs/heads/master 65a93d776 -> 9ee5b6297


Renamed shell scripts wso2server.sh and wso2server.bat to stratos.sh and stratos.bat

Signed-off-by: Lakmal Warusawithana <la...@wso2.com>


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

Branch: refs/heads/master
Commit: 9ee5b6297b1caffcb3dce72d2e4ed6709a219575
Parents: 65a93d7
Author: Imesh Gunaratne <im...@wso2.com>
Authored: Tue Jul 23 12:12:57 2013 +0530
Committer: Lakmal Warusawithana <la...@wso2.com>
Committed: Tue Jul 23 12:56:34 2013 +0530

----------------------------------------------------------------------
 products/cloud_controller/INSTALL.txt           |  10 +-
 products/cloud_controller/README.txt            |   2 +-
 .../cloud_controller/docs/xdoc/admin_guide.xml  |   6 +-
 .../docs/xdoc/installation_guide.xml            |   6 +-
 .../docs/xdoc/release-notes.xml                 |   2 +-
 .../distribution/src/main/assembly/bin.xml      |  10 +-
 .../distribution/src/main/resources/stratos.bat | 274 +++++++++++++++++
 .../distribution/src/main/resources/stratos.sh  | 296 +++++++++++++++++++
 .../src/main/resources/wso2server.bat           | 274 -----------------
 .../src/main/resources/wso2server.sh            | 296 -------------------
 .../distribution/src/site/xdoc/admin_guide.xml  |   6 +-
 .../src/site/xdoc/installation_guide.xml        |   6 +-
 .../src/site/xdoc/release-notes.xml             |   2 +-
 13 files changed, 595 insertions(+), 595 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/INSTALL.txt
----------------------------------------------------------------------
diff --git a/products/cloud_controller/INSTALL.txt b/products/cloud_controller/INSTALL.txt
index b889c8b..97c8853 100644
--- a/products/cloud_controller/INSTALL.txt
+++ b/products/cloud_controller/INSTALL.txt
@@ -6,14 +6,14 @@ Installing  Apache Stratos Cloud Controller Server (CC) 1.0.1
 
 2. All the shell scripts and .bat files are available in CARBON_HOME/bin folder.
 
-3. To start CC one can use either wso2server.sh in all Unix
-   systems & wso2server.bat file on Windows operating systems.
+3. To start CC one can use either stratos.sh in all Unix
+   systems & stratos.bat file on Windows operating systems.
 
 4. Either of the following commands can be used to start CC
-      i)  ./wso2server.sh {console|start|stop|restart|version}
-      ii)  wso2server.bat {start|stop|version}
+      i)  ./stratos.sh {console|start|stop|restart|version}
+      ii)  stratos.bat {start|stop|version}
 
-            Usage: wso2server.sh [command] [options] [system-properties]
+            Usage: stratos.sh [command] [options] [system-properties]
 
                 command:
                     --start	    Start CC as a Unix daemon in the background

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/README.txt
----------------------------------------------------------------------
diff --git a/products/cloud_controller/README.txt b/products/cloud_controller/README.txt
index babd0f6..8adcd5f 100644
--- a/products/cloud_controller/README.txt
+++ b/products/cloud_controller/README.txt
@@ -69,7 +69,7 @@ Installation & Running
 ==================================
 
 1. Extract the stratos-cc-1.0.1.zip and go to the extracted directory
-2. Run the wso2server.sh or wso2server.bat as appropriate
+2. Run the stratos.sh or stratos.bat as appropriate
 3. Point your favourite browser to
 
     https://localhost:9443/carbon

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/docs/xdoc/admin_guide.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/docs/xdoc/admin_guide.xml b/products/cloud_controller/docs/xdoc/admin_guide.xml
index 7f6eae5..3b55765 100644
--- a/products/cloud_controller/docs/xdoc/admin_guide.xml
+++ b/products/cloud_controller/docs/xdoc/admin_guide.xml
@@ -115,8 +115,8 @@ which Java is installed. </p>
 <h5>4.1 Running WSO2 MB in Standalone Mode </h5>
 
 <p>Now you are all set to start WSO2 MB in the standalone mode. Go to
-MB_HOME/bin directory and if you are on Unix/Linux execute the wso2server.sh
-shell script or if you are on Windows execute the wso2server.bat batch file.
+MB_HOME/bin directory and if you are on Unix/Linux execute the stratos.sh
+shell script or if you are on Windows execute the stratos.bat batch file.
 This will start the MB and you can see the progress of the startup procedure
 on the console. Please note that server startup may take some time depending on
 the hardware configuration of your system. The first time startup can take up
@@ -306,7 +306,7 @@ files (with .bat extension) for Windows users. In general you will find the
 following scripts in this directory.<br />
 <br />
 <ul>
-  <li>wso2server.sh/wso2server.bat - Launches WSO2 MB </li>
+  <li>stratos.sh/stratos.bat - Launches WSO2 MB </li>
   <li>wsdl2java.sh/wsdl2java.bat - Launches the Java stub generation tool for
     Web Services </li>
   <li>java2wsdl.sh/java2wsdl.bat - Launches the WSDL generation tool for Java

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/docs/xdoc/installation_guide.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/docs/xdoc/installation_guide.xml b/products/cloud_controller/docs/xdoc/installation_guide.xml
index 7153c28..7f9cf72 100644
--- a/products/cloud_controller/docs/xdoc/installation_guide.xml
+++ b/products/cloud_controller/docs/xdoc/installation_guide.xml
@@ -217,8 +217,8 @@
             </li>
             <li>
                 Execute the WSO2 MB start script or the daemon script from the bin
-                directory. e.g. ./wso2server.sh OR ./daemon.sh start OR
-                ./wso2server.sh --console
+                directory. e.g. ./stratos.sh OR ./daemon.sh start OR
+                ./stratos.sh --console
             </li>
             <li>
                 Check your WSO2 MB instance using the URL https://localhost:9443/carbon
@@ -252,7 +252,7 @@
                 variable to the Java /bin directory.
             </li>
             <li>
-                Execute the WSO2 MB start script from the bin folder. e.g. wso2server.bat
+                Execute the WSO2 MB start script from the bin folder. e.g. stratos.bat
             </li>
             <li>
                 If you would like to install the WSO2 MB as a Windows service, use the

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/docs/xdoc/release-notes.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/docs/xdoc/release-notes.xml b/products/cloud_controller/docs/xdoc/release-notes.xml
index 797c4bc..5f16e20 100644
--- a/products/cloud_controller/docs/xdoc/release-notes.xml
+++ b/products/cloud_controller/docs/xdoc/release-notes.xml
@@ -70,7 +70,7 @@
             <ol>
               <li>Extract the downloaded zip</li>
               <li>Go to the bin directory in the extracted folder</li>
-              <li>Run the wso2server.sh or wso2server.bat as appropriate</li>
+              <li>Run the stratos.sh or stratos.bat as appropriate</li>
               <li>Point your browser to the URL https://localhost:9443/carbon</li>
               <li>Use "admin", "admin" as the username and password to login as an admin</li>
               <li>If you need to start the OSGi console with the server use the property

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml b/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
index 87054c1..41dc99e 100644
--- a/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
+++ b/products/cloud_controller/modules/distribution/src/main/assembly/bin.xml
@@ -35,7 +35,7 @@
                 <exclude>**/repository/services/version/**</exclude>
                 <exclude>**/version.txt</exclude>
                 <exclude>**/LICENSE.txt</exclude>
-                <exclude>**/wso2server.bat</exclude>
+                <exclude>**/stratos.bat</exclude>
 		<exclude>**/launch.ini</exclude>
                 <exclude>**/README.txt</exclude>
                 <exclude>**/INSTALL.txt</exclude>
@@ -47,8 +47,8 @@
             <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
             <outputDirectory>stratos-cc-${pom.version}</outputDirectory>
             <excludes>
-                <exclude>**/wso2server.sh</exclude>
-                <exclude>**/wso2server.bat</exclude>     
+                <exclude>**/stratos.sh</exclude>
+                <exclude>**/stratos.bat</exclude>
             </excludes>
 	    <includes>
                 <include>**/*.sh</include>
@@ -218,7 +218,7 @@
             <outputDirectory>stratos-cc-${pom.version}/repository/conf/security</outputDirectory>
         </file>
          <file>
-            <source>src/main/resources/wso2server.sh</source>
+            <source>src/main/resources/stratos.sh</source>
             <outputDirectory>stratos-cc-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>
@@ -242,7 +242,7 @@
             <filtered>true</filtered>
         </file>
          <file>
-            <source>src/main/resources/wso2server.bat</source>
+            <source>src/main/resources/stratos.bat</source>
             <outputDirectory>stratos-cc-${pom.version}/bin/</outputDirectory>
             <filtered>true</filtered>
             <fileMode>755</fileMode>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/main/resources/stratos.bat
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/stratos.bat b/products/cloud_controller/modules/distribution/src/main/resources/stratos.bat
new file mode 100644
index 0000000..0936425
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/resources/stratos.bat
@@ -0,0 +1,274 @@
+@echo off
+
+rem ---------------------------------------------------------------------------
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements.  See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership.  The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing,
+rem software distributed under the License is distributed on an
+rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+rem KIND, either express or implied.  See the License for the
+rem specific language governing permissions and limitations
+rem under the License.
+
+rem ---------------------------------------------------------------------------
+rem Main Script for Apache Stratos
+rem
+rem Environment Variable Prerequisites
+rem
+rem   JAVA_HOME       Must point at your Java Development Kit installation.
+rem
+rem   JAVA_OPTS       (Optional) Java runtime options used when the commands
+rem                   is executed.
+rem ---------------------------------------------------------------------------
+
+rem ----- if JAVA_HOME is not set we're not happy ------------------------------
+:checkJava
+
+if "%JAVA_HOME%" == "" goto noJavaHome
+if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
+goto checkServer
+
+:noJavaHome
+echo "You must set the JAVA_HOME variable before running CARBON."
+goto end
+
+rem ----- Only set CARBON_HOME if not already set ----------------------------
+:checkServer
+rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
+if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
+SET curDrive=%cd:~0,1%
+SET wsasDrive=%CARBON_HOME:~0,1%
+if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
+
+rem find CARBON_HOME if it does not exist due to either an invalid value passed
+rem by the user or the %0 problem on Windows 9x
+if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome
+
+set AXIS2_HOME=%CARBON_HOME%
+goto updateClasspath
+
+:noServerHome
+echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
+goto end
+
+rem ----- update classpath -----------------------------------------------------
+:updateClasspath
+
+setlocal EnableDelayedExpansion
+cd %CARBON_HOME%
+set CARBON_CLASSPATH=
+FOR %%C in ("%CARBON_HOME%\bin\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\%%~nC%%~xC"
+
+set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%;
+
+rem ----- Process the input command -------------------------------------------
+
+rem Slurp the command line arguments. This loop allows for an unlimited number
+rem of arguments (up to the command line limit, anyway).
+
+
+:setupArgs
+if ""%1""=="""" goto doneStart
+if ""%1""==""-start""   goto startWinService
+if ""%1""==""--start""  goto startWinService
+if ""%1""==""start""    goto startWinService
+
+if ""%1""==""-run""     goto commandLifecycle
+if ""%1""==""--run""    goto commandLifecycle
+if ""%1""==""run""      goto commandLifecycle
+
+if ""%1""==""-restart""  goto commandLifecycle
+if ""%1""==""--restart"" goto commandLifecycle
+if ""%1""==""restart""   goto commandLifecycle
+
+if ""%1""==""-stop""    goto stopWinService
+if ""%1""==""--stop""   goto stopWinService
+if ""%1""==""stop""     goto stopWinService
+
+if ""%1""==""debug""    goto commandDebug
+if ""%1""==""-debug""   goto commandDebug
+if ""%1""==""--debug""  goto commandDebug
+
+if ""%1""==""version""   goto commandVersion
+if ""%1""==""-version""  goto commandVersion
+if ""%1""==""--version"" goto commandVersion
+
+shift
+goto setupArgs
+
+rem ----- commandVersion -------------------------------------------------------
+:commandVersion
+shift
+type "%CARBON_HOME%\bin\version.txt"
+type "%CARBON_HOME%\bin\wso2carbon-version.txt"
+goto end
+
+rem ----- commandDebug ---------------------------------------------------------
+:commandDebug
+shift
+set DEBUG_PORT=%1
+if "%DEBUG_PORT%"=="" goto noDebugPort
+if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option.
+set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
+echo Please start the remote debugging client to continue...
+goto findJdk
+
+:noDebugPort
+echo Please specify the debug port after the --debug option
+goto end
+
+rem ----- commandLifecycle -----------------------------------------------------
+:commandLifecycle
+goto findJdk
+
+rem ----- doneStart ------------------------------------------------------------
+rem This label provides a place for the argument list loop to break out
+rem and for NT handling to skip to.
+
+:doneStart
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+rem ---------- Handle the SSL Issue with proper JDK version --------------------
+rem find the version of the jdk
+:findJdk
+
+set CMD=RUN %*
+
+:checkJdk16
+"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[6|7]" >NUL
+IF ERRORLEVEL 1 goto unknownJdk
+goto jdk16
+
+:unknownJdk
+echo Starting WSO2 Carbon (in unsupported JDK)
+echo [ERROR] CARBON is supported only on JDK 1.6 and 1.7
+goto jdk16
+
+:jdk16
+goto runServer
+
+rem ----------------- Execute The Requested Command ----------------------------
+
+:runServer
+cd %CARBON_HOME%
+
+rem ---------- Add jars to classpath ----------------
+
+set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
+
+set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
+
+set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -DandesConfig=qpid-config.xml -Ddisable.cassandra.server.startup=true -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\log4j.properties" -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcarbon.logs.path="%CARBON_HOME%\repository\logs" -Dcomponents.repo="%CARBON_HOME%\repos
 itory\components" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH%
+
+:runJava
+echo JAVA_HOME environment variable is set to %JAVA_HOME%
+echo CARBON_HOME environment variable is set to %CARBON_HOME%
+"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.bootstrap.Bootstrap %CMD%
+if "%ERRORLEVEL%"=="121" goto runJava
+:end
+goto endlocal
+
+:startWinService
+rem
+rem Locating Carbon Home
+rem
+rem %~dp0 is the location of this script under NT
+set _REALPATH=%~dp0..\
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_DIR=%_REALPATH%bin\native\
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+pause
+goto :eof
+rem
+rem Locating wrapper.conf
+rem
+:conf
+set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
+rem
+
+rem Starting the Carbon Windows service.
+rem
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF% 2>&1 | findstr "failed" >NUL
+if not errorlevel 1 goto install
+echo The Carbon Windows Service is now running.
+goto endlocal
+
+:install
+echo The Carbon Windows Service is not installed. Would you like to install it now? (y/n)
+set INPUT=
+set /P INPUT=Type input: %=%
+if "%INPUT%"=="" goto install
+if "%INPUT%"=="n" goto noservice
+echo Installing Windows service
+"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
+"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
+echo The Carbon Windows Service is now running.
+goto endlocal
+
+rem If we reached here, it means that the service has failed.
+echo [ERROR] Failed to start the Carbon Windows Service.
+
+:noservice
+echo Sorry. You can't use -start or -stop without installing the Windows service.
+goto endlocal
+
+:stopWinService
+rem
+rem Locating Carbon Home
+rem
+rem %~dp0 is the location of this script under NT
+set _REALPATH=%~dp0..\
+
+rem Decide on the wrapper binary.
+set _WRAPPER_BASE=wrapper
+set _WRAPPER_DIR=%_REALPATH%bin\native\
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+if exist "%_WRAPPER_EXE%" goto conf
+set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+if exist "%_WRAPPER_EXE%" goto conf
+echo Unable to locate a Wrapper executable using any of the following names:
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
+echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
+goto :eof
+
+rem
+rem Locating wrapper.conf
+rem
+:conf
+set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
+rem
+rem Stopping the Carbon Windows service.
+rem
+"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
+echo The Carbon Windows Service is now stopped.
+goto endlocal
+
+rem If we reached here, it means that the service has failed.
+echo [ERROR] Failed to stop the Carbon Windows Service.
+
+:endlocal
+
+:END

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/main/resources/stratos.sh
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/stratos.sh b/products/cloud_controller/modules/distribution/src/main/resources/stratos.sh
new file mode 100644
index 0000000..ea68142
--- /dev/null
+++ b/products/cloud_controller/modules/distribution/src/main/resources/stratos.sh
@@ -0,0 +1,296 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# 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.
+
+# ----------------------------------------------------------------------------
+# Main Script for the Apache Stratos
+#
+# Environment Variable Prerequisites
+#
+#   JAVA_HOME       Must point at your Java Development Kit installation.
+#
+#   JAVA_OPTS       (Optional) Java runtime options used when the commands
+#                   is executed.
+#
+# NOTE: Borrowed generously from Apache Tomcat startup scripts.
+# -----------------------------------------------------------------------------
+
+# OS specific support.  $var _must_ be set to either true or false.
+
+cygwin=false;
+darwin=false;
+os400=false;
+mingw=false;
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+MINGW*) mingw=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true
+        if [ -z "$JAVA_VERSION" ] ; then
+             JAVA_VERSION="CurrentJDK"
+           else
+             echo "Using Java version: $JAVA_VERSION"
+           fi
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           fi
+           ;;
+esac
+
+# resolve links - $0 may be a softlink
+PRG="$0"
+
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '.*/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+
+# Get standard environment variables
+PRGDIR=`dirname "$PRG"`
+
+# Only set CARBON_HOME if not already set
+[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
+
+# Set AXIS2_HOME. Needed for One Click JAR Download
+AXIS2_HOME=$CARBON_HOME
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
+  [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
+fi
+
+# For OS400
+if $os400; then
+  # Set job priority to standard for interactive (interactive - 6) by using
+  # the interactive priority - 6, the helper threads that respond to requests
+  # will be running at the same priority as interactive jobs.
+  COMMAND='chgjob job('$JOBNAME') runpty(6)'
+  system $COMMAND
+
+  # Enable multi threading
+  QIBM_MULTI_THREADED=Y
+  export QIBM_MULTI_THREADED
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$CARBON_HOME" ] &&
+    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  [ -n "$AXIS2_HOME" ] &&
+    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD=java
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo " CARBON cannot execute $JAVACMD"
+  exit 1
+fi
+
+# if JAVA_HOME is not set we're not happy
+if [ -z "$JAVA_HOME" ]; then
+  echo "You must set the JAVA_HOME variable before running CARBON."
+  exit 1
+fi
+
+# ----- Process the input command ----------------------------------------------
+for c in $*
+do
+    if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
+          CMD="--debug"
+          continue
+    elif [ "$CMD" = "--debug" ]; then
+          if [ -z "$PORT" ]; then
+                PORT=$c
+          fi
+    elif [ "$c" = "--n" ] || [ "$c" = "-n" ] || [ "$c" = "n" ]; then
+          CMD="--n"
+          continue
+    elif [ "$CMD" = "--n" ]; then
+          if [ -z "$INSTANCES" ]; then
+                INSTANCES=$c
+          fi
+    elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
+          CMD="stop"
+    elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
+          CMD="start"
+    elif [ "$c" = "--console" ] || [ "$c" = "-console" ] || [ "$c" = "console" ]; then
+          CMD="console"
+    elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
+          CMD="version"
+    elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
+          CMD="restart"
+    elif [ "$c" = "--dump" ] || [ "$c" = "-dump" ] || [ "$c" = "dump" ]; then
+          CMD="dump"
+    elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
+          CMD="test"
+    elif [ "$c" = "--status" ] || [ "$c" = "-status" ] || [ "$c" = "status" ]; then
+          CMD="status"
+    fi
+done
+
+if [ "$CMD" = "--debug" ]; then
+  if [ "$PORT" = "" ]; then
+    echo " Please specify the debug port after the --debug option"
+    exit 1
+  fi
+  if [ -n "$JAVA_OPTS" ]; then
+    echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
+  fi
+  CMD="RUN"
+  JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
+  echo "Please start the remote debugging client to continue..."
+elif [ "$CMD" = "--n" ]; then
+  if [ "$INSTANCES" = "" ] || [ ! -z `echo $INSTANCES | sed 's/[0-9]//g'` ]]; then
+    echo " Please specify the number of instances to start after the --n option"
+    exit 1
+  fi
+elif [ "$CMD" = "start" ]; then
+  export CARBON_HOME=$CARBON_HOME
+  nohup $CARBON_HOME/bin/stratos.sh &
+  exit 0
+elif [ "$CMD" = "stop" ]; then
+  export CARBON_HOME=$CARBON_HOME
+  kill -9 `cat $CARBON_HOME/wso2carbon.pid`
+  exit 0
+elif [ "$CMD" = "restart" ]; then
+  export CARBON_HOME=$CARBON_HOME
+  kill -9 `cat $CARBON_HOME/wso2carbon.pid`
+  nohup $CARBON_HOME/bin/stratos.sh &
+  exit 0
+elif [ "$CMD" = "test" ]; then
+    JAVACMD="exec "$JAVACMD""
+elif [ "$CMD" = "version" ]; then
+  cat $CARBON_HOME/bin/version.txt
+  cat $CARBON_HOME/bin/wso2carbon-version.txt
+  exit 0
+fi
+
+# ---------- Handle the SSL Issue with proper JDK version --------------------
+jdk_16=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[6|7]"`
+if [ "$jdk_16" = "" ]; then
+   echo " Starting WSO2 Carbon (in unsupported JDK)"
+   echo " [ERROR] CARBON is supported only on JDK 1.6 and 1.7"
+fi
+
+CARBON_XBOOTCLASSPATH=""
+for f in "$CARBON_HOME"/lib/xboot/*.jar
+do
+    if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then
+        CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
+    fi
+done
+
+JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
+
+CARBON_CLASSPATH=""
+if [ -e "$JAVA_HOME/lib/tools.jar" ]; then
+    CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
+fi
+for f in "$CARBON_HOME"/bin/*.jar
+do
+    if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
+        CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
+    fi
+done
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
+  CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
+  AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
+  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
+  CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
+  CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
+fi
+
+# ----- Execute The Requested Command -----------------------------------------
+
+echo JAVA_HOME environment variable is set to $JAVA_HOME
+echo CARBON_HOME environment variable is set to $CARBON_HOME
+
+cd "$CARBON_HOME"
+
+START_EXIT_STATUS=121
+status=$START_EXIT_STATUS
+
+while [ "$status" = "$START_EXIT_STATUS" ]
+do
+    $JAVACMD \
+     -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
+     -d64 \
+     -server \
+     -Xms1500m -Xmx3000m \
+     -XX:PermSize=256m -XX:MaxPermSize=512m \
+     -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:-UseGCOverheadLimit \
+     -XX:+CMSClassUnloadingEnabled \
+     -XX:+OptimizeStringConcat \
+     -XX:+HeapDumpOnOutOfMemoryError \
+     -XX:OnOutOfMemoryError="kill -9 `echo $$`;nohup ./stratos.sh &" \
+     -XX:HeapDumpPath=repository/logs/heap-dump.hprof \
+     -XX:ErrorFile=repository/logs/hs_err_pid.log \
+     -XX:OnError="nohup ./stratos.sh &" \
+     -javaagent:"$CARBON_HOME/repository/components/plugins/jamm_0.2.5.wso2v2.jar" \
+    $JAVA_OPTS \
+    -DandesConfig=qpid-config.xml \
+    -Ddisable.cassandra.server.startup=true \
+    -Dcom.sun.management.jmxremote \
+    -classpath "$CARBON_CLASSPATH" \
+    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
+    -Djava.io.tmpdir="$CARBON_HOME/tmp" \
+    -Dcatalina.base="$CARBON_HOME/lib/tomcat" \
+    -Dwso2.server.standalone=true \
+    -Dcarbon.registry.root=/ \
+    -Djava.command="$JAVACMD" \
+    -Dcarbon.home="$CARBON_HOME" \
+    -Dwso2.transports.xml="$CARBON_HOME/repository/conf/mgt-transports.xml" \
+    -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/log4j.properties" \
+    -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \
+    -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \
+    -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \
+    -Dcom.atomikos.icatch.hide_init_file_path=true \
+    -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \
+    -Dcom.sun.jndi.ldap.connect.pool.authentication=simple  \
+    -Dcom.sun.jndi.ldap.connect.pool.timeout=3000  \
+    -Dorg.terracotta.quartz.skipUpdateCheck=true \
+    org.wso2.carbon.bootstrap.Bootstrap $*
+    status=$?
+done

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat b/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
deleted file mode 100644
index 0936425..0000000
--- a/products/cloud_controller/modules/distribution/src/main/resources/wso2server.bat
+++ /dev/null
@@ -1,274 +0,0 @@
-@echo off
-
-rem ---------------------------------------------------------------------------
-rem Licensed to the Apache Software Foundation (ASF) under one
-rem or more contributor license agreements.  See the NOTICE file
-rem distributed with this work for additional information
-rem regarding copyright ownership.  The ASF licenses this file
-rem to you under the Apache License, Version 2.0 (the
-rem "License"); you may not use this file except in compliance
-rem with the License.  You may obtain a copy of the License at
-rem
-rem     http://www.apache.org/licenses/LICENSE-2.0
-rem
-rem Unless required by applicable law or agreed to in writing,
-rem software distributed under the License is distributed on an
-rem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem KIND, either express or implied.  See the License for the
-rem specific language governing permissions and limitations
-rem under the License.
-
-rem ---------------------------------------------------------------------------
-rem Main Script for Apache Stratos
-rem
-rem Environment Variable Prerequisites
-rem
-rem   JAVA_HOME       Must point at your Java Development Kit installation.
-rem
-rem   JAVA_OPTS       (Optional) Java runtime options used when the commands
-rem                   is executed.
-rem ---------------------------------------------------------------------------
-
-rem ----- if JAVA_HOME is not set we're not happy ------------------------------
-:checkJava
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
-goto checkServer
-
-:noJavaHome
-echo "You must set the JAVA_HOME variable before running CARBON."
-goto end
-
-rem ----- Only set CARBON_HOME if not already set ----------------------------
-:checkServer
-rem %~sdp0 is expanded pathname of the current script under NT with spaces in the path removed
-if "%CARBON_HOME%"=="" set CARBON_HOME=%~sdp0..
-SET curDrive=%cd:~0,1%
-SET wsasDrive=%CARBON_HOME:~0,1%
-if not "%curDrive%" == "%wsasDrive%" %wsasDrive%:
-
-rem find CARBON_HOME if it does not exist due to either an invalid value passed
-rem by the user or the %0 problem on Windows 9x
-if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome
-
-set AXIS2_HOME=%CARBON_HOME%
-goto updateClasspath
-
-:noServerHome
-echo CARBON_HOME is set incorrectly or CARBON could not be located. Please set CARBON_HOME.
-goto end
-
-rem ----- update classpath -----------------------------------------------------
-:updateClasspath
-
-setlocal EnableDelayedExpansion
-cd %CARBON_HOME%
-set CARBON_CLASSPATH=
-FOR %%C in ("%CARBON_HOME%\bin\*.jar") DO set CARBON_CLASSPATH=!CARBON_CLASSPATH!;".\bin\%%~nC%%~xC"
-
-set CARBON_CLASSPATH="%JAVA_HOME%\lib\tools.jar";%CARBON_CLASSPATH%;
-
-rem ----- Process the input command -------------------------------------------
-
-rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of arguments (up to the command line limit, anyway).
-
-
-:setupArgs
-if ""%1""=="""" goto doneStart
-if ""%1""==""-start""   goto startWinService
-if ""%1""==""--start""  goto startWinService
-if ""%1""==""start""    goto startWinService
-
-if ""%1""==""-run""     goto commandLifecycle
-if ""%1""==""--run""    goto commandLifecycle
-if ""%1""==""run""      goto commandLifecycle
-
-if ""%1""==""-restart""  goto commandLifecycle
-if ""%1""==""--restart"" goto commandLifecycle
-if ""%1""==""restart""   goto commandLifecycle
-
-if ""%1""==""-stop""    goto stopWinService
-if ""%1""==""--stop""   goto stopWinService
-if ""%1""==""stop""     goto stopWinService
-
-if ""%1""==""debug""    goto commandDebug
-if ""%1""==""-debug""   goto commandDebug
-if ""%1""==""--debug""  goto commandDebug
-
-if ""%1""==""version""   goto commandVersion
-if ""%1""==""-version""  goto commandVersion
-if ""%1""==""--version"" goto commandVersion
-
-shift
-goto setupArgs
-
-rem ----- commandVersion -------------------------------------------------------
-:commandVersion
-shift
-type "%CARBON_HOME%\bin\version.txt"
-type "%CARBON_HOME%\bin\wso2carbon-version.txt"
-goto end
-
-rem ----- commandDebug ---------------------------------------------------------
-:commandDebug
-shift
-set DEBUG_PORT=%1
-if "%DEBUG_PORT%"=="" goto noDebugPort
-if not "%JAVA_OPTS%"=="" echo Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option.
-set JAVA_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=%DEBUG_PORT%
-echo Please start the remote debugging client to continue...
-goto findJdk
-
-:noDebugPort
-echo Please specify the debug port after the --debug option
-goto end
-
-rem ----- commandLifecycle -----------------------------------------------------
-:commandLifecycle
-goto findJdk
-
-rem ----- doneStart ------------------------------------------------------------
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-:doneStart
-if "%OS%"=="Windows_NT" @setlocal
-if "%OS%"=="WINNT" @setlocal
-
-rem ---------- Handle the SSL Issue with proper JDK version --------------------
-rem find the version of the jdk
-:findJdk
-
-set CMD=RUN %*
-
-:checkJdk16
-"%JAVA_HOME%\bin\java" -version 2>&1 | findstr /r "1.[6|7]" >NUL
-IF ERRORLEVEL 1 goto unknownJdk
-goto jdk16
-
-:unknownJdk
-echo Starting WSO2 Carbon (in unsupported JDK)
-echo [ERROR] CARBON is supported only on JDK 1.6 and 1.7
-goto jdk16
-
-:jdk16
-goto runServer
-
-rem ----------------- Execute The Requested Command ----------------------------
-
-:runServer
-cd %CARBON_HOME%
-
-rem ---------- Add jars to classpath ----------------
-
-set CARBON_CLASSPATH=.\lib;%CARBON_CLASSPATH%
-
-set JAVA_ENDORSED=".\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed"
-
-set CMD_LINE_ARGS=-Xbootclasspath/a:%CARBON_XBOOTCLASSPATH% -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dcom.sun.management.jmxremote -classpath %CARBON_CLASSPATH% %JAVA_OPTS% -Djava.endorsed.dirs=%JAVA_ENDORSED% -DandesConfig=qpid-config.xml -Ddisable.cassandra.server.startup=true -Dcarbon.registry.root=/ -Dcarbon.home="%CARBON_HOME%" -Dwso2.server.standalone=true -Djava.command="%JAVA_HOME%\bin\java" -Djava.opts="%JAVA_OPTS%" -Djava.io.tmpdir="%CARBON_HOME%\tmp" -Dcatalina.base="%CARBON_HOME%\lib\tomcat" -Dwso2.carbon.xml=%CARBON_HOME%\repository\conf\carbon.xml -Dwso2.registry.xml="%CARBON_HOME%\repository\conf\registry.xml" -Dwso2.user.mgt.xml="%CARBON_HOME%\repository\conf\user-mgt.xml" -Dwso2.transports.xml="%CARBON_HOME%\repository\conf\mgt-transports.xml" -Djava.util.logging.config.file="%CARBON_HOME%\repository\conf\log4j.properties" -Dcarbon.config.dir.path="%CARBON_HOME%\repository\conf" -Dcarbon.logs.path="%CARBON_HOME%\repository\logs" -Dcomponents.repo="%CARBON_HOME%\repos
 itory\components" -Dcom.atomikos.icatch.file="%CARBON_HOME%\lib\transactions.properties" -Dcom.atomikos.icatch.hide_init_file_path="true" -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dcom.sun.jndi.ldap.connect.pool.authentication=simple -Dcom.sun.jndi.ldap.connect.pool.timeout=3000 -Dorg.terracotta.quartz.skipUpdateCheck=true -Dcarbon.classpath=%CARBON_CLASSPATH%
-
-:runJava
-echo JAVA_HOME environment variable is set to %JAVA_HOME%
-echo CARBON_HOME environment variable is set to %CARBON_HOME%
-"%JAVA_HOME%\bin\java" %CMD_LINE_ARGS% org.wso2.carbon.bootstrap.Bootstrap %CMD%
-if "%ERRORLEVEL%"=="121" goto runJava
-:end
-goto endlocal
-
-:startWinService
-rem
-rem Locating Carbon Home
-rem
-rem %~dp0 is the location of this script under NT
-set _REALPATH=%~dp0..\
-
-rem Decide on the wrapper binary.
-set _WRAPPER_BASE=wrapper
-set _WRAPPER_DIR=%_REALPATH%bin\native\
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
-if exist "%_WRAPPER_EXE%" goto conf
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
-if exist "%_WRAPPER_EXE%" goto conf
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
-if exist "%_WRAPPER_EXE%" goto conf
-echo Unable to locate a Wrapper executable using any of the following names:
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
-pause
-goto :eof
-rem
-rem Locating wrapper.conf
-rem
-:conf
-set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
-rem
-
-rem Starting the Carbon Windows service.
-rem
-"%_WRAPPER_EXE%" -t %_WRAPPER_CONF% 2>&1 | findstr "failed" >NUL
-if not errorlevel 1 goto install
-echo The Carbon Windows Service is now running.
-goto endlocal
-
-:install
-echo The Carbon Windows Service is not installed. Would you like to install it now? (y/n)
-set INPUT=
-set /P INPUT=Type input: %=%
-if "%INPUT%"=="" goto install
-if "%INPUT%"=="n" goto noservice
-echo Installing Windows service
-"%_WRAPPER_EXE%" -i %_WRAPPER_CONF%
-"%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
-echo The Carbon Windows Service is now running.
-goto endlocal
-
-rem If we reached here, it means that the service has failed.
-echo [ERROR] Failed to start the Carbon Windows Service.
-
-:noservice
-echo Sorry. You can't use -start or -stop without installing the Windows service.
-goto endlocal
-
-:stopWinService
-rem
-rem Locating Carbon Home
-rem
-rem %~dp0 is the location of this script under NT
-set _REALPATH=%~dp0..\
-
-rem Decide on the wrapper binary.
-set _WRAPPER_BASE=wrapper
-set _WRAPPER_DIR=%_REALPATH%bin\native\
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
-if exist "%_WRAPPER_EXE%" goto conf
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
-if exist "%_WRAPPER_EXE%" goto conf
-set _WRAPPER_EXE=%_WRAPPER_DIR%%_WRAPPER_BASE%.exe
-if exist "%_WRAPPER_EXE%" goto conf
-echo Unable to locate a Wrapper executable using any of the following names:
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-32.exe
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%-windows-x86-64.exe
-echo %_WRAPPER_DIR%%_WRAPPER_BASE%.exe
-goto :eof
-
-rem
-rem Locating wrapper.conf
-rem
-:conf
-set _WRAPPER_CONF="%_REALPATH%repository\conf\wrapper.conf"
-rem
-rem Stopping the Carbon Windows service.
-rem
-"%_WRAPPER_EXE%" -p %_WRAPPER_CONF%
-echo The Carbon Windows Service is now stopped.
-goto endlocal
-
-rem If we reached here, it means that the service has failed.
-echo [ERROR] Failed to stop the Carbon Windows Service.
-
-:endlocal
-
-:END

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/main/resources/wso2server.sh
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/main/resources/wso2server.sh b/products/cloud_controller/modules/distribution/src/main/resources/wso2server.sh
deleted file mode 100644
index a7ebb79..0000000
--- a/products/cloud_controller/modules/distribution/src/main/resources/wso2server.sh
+++ /dev/null
@@ -1,296 +0,0 @@
-#!/bin/sh
-# ----------------------------------------------------------------------------
-# 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.
-
-# ----------------------------------------------------------------------------
-# Main Script for the Apache Stratos
-#
-# Environment Variable Prerequisites
-#
-#   JAVA_HOME       Must point at your Java Development Kit installation.
-#
-#   JAVA_OPTS       (Optional) Java runtime options used when the commands
-#                   is executed.
-#
-# NOTE: Borrowed generously from Apache Tomcat startup scripts.
-# -----------------------------------------------------------------------------
-
-# OS specific support.  $var _must_ be set to either true or false.
-
-cygwin=false;
-darwin=false;
-os400=false;
-mingw=false;
-case "`uname`" in
-CYGWIN*) cygwin=true;;
-MINGW*) mingw=true;;
-OS400*) os400=true;;
-Darwin*) darwin=true
-        if [ -z "$JAVA_VERSION" ] ; then
-             JAVA_VERSION="CurrentJDK"
-           else
-             echo "Using Java version: $JAVA_VERSION"
-           fi
-           if [ -z "$JAVA_HOME" ] ; then
-             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
-           fi
-           ;;
-esac
-
-# resolve links - $0 may be a softlink
-PRG="$0"
-
-while [ -h "$PRG" ]; do
-  ls=`ls -ld "$PRG"`
-  link=`expr "$ls" : '.*-> \(.*\)$'`
-  if expr "$link" : '.*/.*' > /dev/null; then
-    PRG="$link"
-  else
-    PRG=`dirname "$PRG"`/"$link"
-  fi
-done
-
-# Get standard environment variables
-PRGDIR=`dirname "$PRG"`
-
-# Only set CARBON_HOME if not already set
-[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/.." ; pwd`
-
-# Set AXIS2_HOME. Needed for One Click JAR Download
-AXIS2_HOME=$CARBON_HOME
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin; then
-  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
-  [ -n "$CARBON_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
-  [ -n "$AXIS2_HOME" ] && CARBON_HOME=`cygpath --unix "$CARBON_HOME"`
-fi
-
-# For OS400
-if $os400; then
-  # Set job priority to standard for interactive (interactive - 6) by using
-  # the interactive priority - 6, the helper threads that respond to requests
-  # will be running at the same priority as interactive jobs.
-  COMMAND='chgjob job('$JOBNAME') runpty(6)'
-  system $COMMAND
-
-  # Enable multi threading
-  QIBM_MULTI_THREADED=Y
-  export QIBM_MULTI_THREADED
-fi
-
-# For Migwn, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
-  [ -n "$CARBON_HOME" ] &&
-    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
-  [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
-  [ -n "$AXIS2_HOME" ] &&
-    CARBON_HOME="`(cd "$CARBON_HOME"; pwd)`"
-  # TODO classpath?
-fi
-
-if [ -z "$JAVACMD" ] ; then
-  if [ -n "$JAVA_HOME"  ] ; then
-    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
-      JAVACMD="$JAVA_HOME/jre/sh/java"
-    else
-      JAVACMD="$JAVA_HOME/bin/java"
-    fi
-  else
-    JAVACMD=java
-  fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
-  echo "Error: JAVA_HOME is not defined correctly."
-  echo " CARBON cannot execute $JAVACMD"
-  exit 1
-fi
-
-# if JAVA_HOME is not set we're not happy
-if [ -z "$JAVA_HOME" ]; then
-  echo "You must set the JAVA_HOME variable before running CARBON."
-  exit 1
-fi
-
-# ----- Process the input command ----------------------------------------------
-for c in $*
-do
-    if [ "$c" = "--debug" ] || [ "$c" = "-debug" ] || [ "$c" = "debug" ]; then
-          CMD="--debug"
-          continue
-    elif [ "$CMD" = "--debug" ]; then
-          if [ -z "$PORT" ]; then
-                PORT=$c
-          fi
-    elif [ "$c" = "--n" ] || [ "$c" = "-n" ] || [ "$c" = "n" ]; then
-          CMD="--n"
-          continue
-    elif [ "$CMD" = "--n" ]; then
-          if [ -z "$INSTANCES" ]; then
-                INSTANCES=$c
-          fi
-    elif [ "$c" = "--stop" ] || [ "$c" = "-stop" ] || [ "$c" = "stop" ]; then
-          CMD="stop"
-    elif [ "$c" = "--start" ] || [ "$c" = "-start" ] || [ "$c" = "start" ]; then
-          CMD="start"
-    elif [ "$c" = "--console" ] || [ "$c" = "-console" ] || [ "$c" = "console" ]; then
-          CMD="console"
-    elif [ "$c" = "--version" ] || [ "$c" = "-version" ] || [ "$c" = "version" ]; then
-          CMD="version"
-    elif [ "$c" = "--restart" ] || [ "$c" = "-restart" ] || [ "$c" = "restart" ]; then
-          CMD="restart"
-    elif [ "$c" = "--dump" ] || [ "$c" = "-dump" ] || [ "$c" = "dump" ]; then
-          CMD="dump"
-    elif [ "$c" = "--test" ] || [ "$c" = "-test" ] || [ "$c" = "test" ]; then
-          CMD="test"
-    elif [ "$c" = "--status" ] || [ "$c" = "-status" ] || [ "$c" = "status" ]; then
-          CMD="status"
-    fi
-done
-
-if [ "$CMD" = "--debug" ]; then
-  if [ "$PORT" = "" ]; then
-    echo " Please specify the debug port after the --debug option"
-    exit 1
-  fi
-  if [ -n "$JAVA_OPTS" ]; then
-    echo "Warning !!!. User specified JAVA_OPTS will be ignored, once you give the --debug option."
-  fi
-  CMD="RUN"
-  JAVA_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=$PORT"
-  echo "Please start the remote debugging client to continue..."
-elif [ "$CMD" = "--n" ]; then
-  if [ "$INSTANCES" = "" ] || [ ! -z `echo $INSTANCES | sed 's/[0-9]//g'` ]]; then
-    echo " Please specify the number of instances to start after the --n option"
-    exit 1
-  fi
-elif [ "$CMD" = "start" ]; then
-  export CARBON_HOME=$CARBON_HOME
-  nohup $CARBON_HOME/bin/wso2server.sh &
-  exit 0
-elif [ "$CMD" = "stop" ]; then
-  export CARBON_HOME=$CARBON_HOME
-  kill -9 `cat $CARBON_HOME/wso2carbon.pid`
-  exit 0
-elif [ "$CMD" = "restart" ]; then
-  export CARBON_HOME=$CARBON_HOME
-  kill -9 `cat $CARBON_HOME/wso2carbon.pid`
-  nohup $CARBON_HOME/bin/wso2server.sh &
-  exit 0
-elif [ "$CMD" = "test" ]; then
-    JAVACMD="exec "$JAVACMD""
-elif [ "$CMD" = "version" ]; then
-  cat $CARBON_HOME/bin/version.txt
-  cat $CARBON_HOME/bin/wso2carbon-version.txt
-  exit 0
-fi
-
-# ---------- Handle the SSL Issue with proper JDK version --------------------
-jdk_16=`$JAVA_HOME/bin/java -version 2>&1 | grep "1.[6|7]"`
-if [ "$jdk_16" = "" ]; then
-   echo " Starting WSO2 Carbon (in unsupported JDK)"
-   echo " [ERROR] CARBON is supported only on JDK 1.6 and 1.7"
-fi
-
-CARBON_XBOOTCLASSPATH=""
-for f in "$CARBON_HOME"/lib/xboot/*.jar
-do
-    if [ "$f" != "$CARBON_HOME/lib/xboot/*.jar" ];then
-        CARBON_XBOOTCLASSPATH="$CARBON_XBOOTCLASSPATH":$f
-    fi
-done
-
-JAVA_ENDORSED_DIRS="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed"
-
-CARBON_CLASSPATH=""
-if [ -e "$JAVA_HOME/lib/tools.jar" ]; then
-    CARBON_CLASSPATH="$JAVA_HOME/lib/tools.jar"
-fi
-for f in "$CARBON_HOME"/bin/*.jar
-do
-    if [ "$f" != "$CARBON_HOME/bin/*.jar" ];then
-        CARBON_CLASSPATH="$CARBON_CLASSPATH":$f
-    fi
-done
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
-  JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
-  CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
-  AXIS2_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
-  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
-  JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
-  CARBON_CLASSPATH=`cygpath --path --windows "$CARBON_CLASSPATH"`
-  CARBON_XBOOTCLASSPATH=`cygpath --path --windows "$CARBON_XBOOTCLASSPATH"`
-fi
-
-# ----- Execute The Requested Command -----------------------------------------
-
-echo JAVA_HOME environment variable is set to $JAVA_HOME
-echo CARBON_HOME environment variable is set to $CARBON_HOME
-
-cd "$CARBON_HOME"
-
-START_EXIT_STATUS=121
-status=$START_EXIT_STATUS
-
-while [ "$status" = "$START_EXIT_STATUS" ]
-do
-    $JAVACMD \
-     -Xbootclasspath/a:"$CARBON_XBOOTCLASSPATH" \
-     -d64 \
-     -server \
-     -Xms1500m -Xmx3000m \
-     -XX:PermSize=256m -XX:MaxPermSize=512m \
-     -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:-UseGCOverheadLimit \
-     -XX:+CMSClassUnloadingEnabled \
-     -XX:+OptimizeStringConcat \
-     -XX:+HeapDumpOnOutOfMemoryError \
-     -XX:OnOutOfMemoryError="kill -9 `echo $$`;nohup ./wso2server.sh &" \
-     -XX:HeapDumpPath=repository/logs/heap-dump.hprof \
-     -XX:ErrorFile=repository/logs/hs_err_pid.log \
-     -XX:OnError="nohup ./wso2server.sh &" \
-     -javaagent:"$CARBON_HOME/repository/components/plugins/jamm_0.2.5.wso2v2.jar" \
-    $JAVA_OPTS \
-    -DandesConfig=qpid-config.xml \
-    -Ddisable.cassandra.server.startup=true \
-    -Dcom.sun.management.jmxremote \
-    -classpath "$CARBON_CLASSPATH" \
-    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
-    -Djava.io.tmpdir="$CARBON_HOME/tmp" \
-    -Dcatalina.base="$CARBON_HOME/lib/tomcat" \
-    -Dwso2.server.standalone=true \
-    -Dcarbon.registry.root=/ \
-    -Djava.command="$JAVACMD" \
-    -Dcarbon.home="$CARBON_HOME" \
-    -Dwso2.transports.xml="$CARBON_HOME/repository/conf/mgt-transports.xml" \
-    -Djava.util.logging.config.file="$CARBON_HOME/repository/conf/log4j.properties" \
-    -Dcarbon.config.dir.path="$CARBON_HOME/repository/conf" \
-    -Dcomponents.repo="$CARBON_HOME/repository/components/plugins" \
-    -Dcom.atomikos.icatch.file="$CARBON_HOME/lib/transactions.properties" \
-    -Dcom.atomikos.icatch.hide_init_file_path=true \
-    -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true \
-    -Dcom.sun.jndi.ldap.connect.pool.authentication=simple  \
-    -Dcom.sun.jndi.ldap.connect.pool.timeout=3000  \
-    -Dorg.terracotta.quartz.skipUpdateCheck=true \
-    org.wso2.carbon.bootstrap.Bootstrap $*
-    status=$?
-done

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/site/xdoc/admin_guide.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/xdoc/admin_guide.xml b/products/cloud_controller/modules/distribution/src/site/xdoc/admin_guide.xml
index 7f6eae5..3b55765 100644
--- a/products/cloud_controller/modules/distribution/src/site/xdoc/admin_guide.xml
+++ b/products/cloud_controller/modules/distribution/src/site/xdoc/admin_guide.xml
@@ -115,8 +115,8 @@ which Java is installed. </p>
 <h5>4.1 Running WSO2 MB in Standalone Mode </h5>
 
 <p>Now you are all set to start WSO2 MB in the standalone mode. Go to
-MB_HOME/bin directory and if you are on Unix/Linux execute the wso2server.sh
-shell script or if you are on Windows execute the wso2server.bat batch file.
+MB_HOME/bin directory and if you are on Unix/Linux execute the stratos.sh
+shell script or if you are on Windows execute the stratos.bat batch file.
 This will start the MB and you can see the progress of the startup procedure
 on the console. Please note that server startup may take some time depending on
 the hardware configuration of your system. The first time startup can take up
@@ -306,7 +306,7 @@ files (with .bat extension) for Windows users. In general you will find the
 following scripts in this directory.<br />
 <br />
 <ul>
-  <li>wso2server.sh/wso2server.bat - Launches WSO2 MB </li>
+  <li>stratos.sh/stratos.bat - Launches WSO2 MB </li>
   <li>wsdl2java.sh/wsdl2java.bat - Launches the Java stub generation tool for
     Web Services </li>
   <li>java2wsdl.sh/java2wsdl.bat - Launches the WSDL generation tool for Java

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/site/xdoc/installation_guide.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/xdoc/installation_guide.xml b/products/cloud_controller/modules/distribution/src/site/xdoc/installation_guide.xml
index 7153c28..7f9cf72 100644
--- a/products/cloud_controller/modules/distribution/src/site/xdoc/installation_guide.xml
+++ b/products/cloud_controller/modules/distribution/src/site/xdoc/installation_guide.xml
@@ -217,8 +217,8 @@
             </li>
             <li>
                 Execute the WSO2 MB start script or the daemon script from the bin
-                directory. e.g. ./wso2server.sh OR ./daemon.sh start OR
-                ./wso2server.sh --console
+                directory. e.g. ./stratos.sh OR ./daemon.sh start OR
+                ./stratos.sh --console
             </li>
             <li>
                 Check your WSO2 MB instance using the URL https://localhost:9443/carbon
@@ -252,7 +252,7 @@
                 variable to the Java /bin directory.
             </li>
             <li>
-                Execute the WSO2 MB start script from the bin folder. e.g. wso2server.bat
+                Execute the WSO2 MB start script from the bin folder. e.g. stratos.bat
             </li>
             <li>
                 If you would like to install the WSO2 MB as a Windows service, use the

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9ee5b629/products/cloud_controller/modules/distribution/src/site/xdoc/release-notes.xml
----------------------------------------------------------------------
diff --git a/products/cloud_controller/modules/distribution/src/site/xdoc/release-notes.xml b/products/cloud_controller/modules/distribution/src/site/xdoc/release-notes.xml
index 797c4bc..5f16e20 100644
--- a/products/cloud_controller/modules/distribution/src/site/xdoc/release-notes.xml
+++ b/products/cloud_controller/modules/distribution/src/site/xdoc/release-notes.xml
@@ -70,7 +70,7 @@
             <ol>
               <li>Extract the downloaded zip</li>
               <li>Go to the bin directory in the extracted folder</li>
-              <li>Run the wso2server.sh or wso2server.bat as appropriate</li>
+              <li>Run the stratos.sh or stratos.bat as appropriate</li>
               <li>Point your browser to the URL https://localhost:9443/carbon</li>
               <li>Use "admin", "admin" as the username and password to login as an admin</li>
               <li>If you need to start the OSGi console with the server use the property