diff --git a/apollo-adminservice/src/main/scripts/common_startup.sh b/apollo-adminservice/src/main/scripts/common_startup.sh
new file mode 100644
index 0000000000000000000000000000000000000000..4d7a6c205916ea44b28fac69ec5ba3e0e56675a8
--- /dev/null
+++ b/apollo-adminservice/src/main/scripts/common_startup.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
+ export JAVA_HOME=/usr/java/latest/
+fi
+
+cd `dirname $0`/..
+
+for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+done
+
+if [[ ! -f PATH_TO_JAR && -d current ]]; then
+ cd current
+ for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+ do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+ done
+fi
+
+if [[ -f $SERVICE_NAME".jar" ]]; then
+ rm -rf $SERVICE_NAME".jar"
+fi
+
+ln $PATH_TO_JAR $SERVICE_NAME".jar"
+chmod a+x $SERVICE_NAME".jar"
+./$SERVICE_NAME".jar" start
+
+rc=$?;
+
+if [[ $rc != 0 ]];
+then
+ echo "Failed to start $SERVICE_NAME.jar, return code: $rc"
+ exit $rc;
+fi
+
+declare -i counter=0
+declare -i max_counter=30 # 30*5=150s
+declare -i total_time=0
+
+printf "Waiting for server startup"
+until [[ (( counter -ge max_counter )) || "$(curl --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
+do
+ printf "."
+ counter+=1
+ sleep 5
+done
+
+total_time=counter*5
+
+if [[ (( counter -ge max_counter )) ]];
+then
+ printf "\nServer failed to start in $total_time seconds!\n"
+ exit 1;
+fi
+
+printf "\nServer started in $total_time seconds!\n"
+
+exit 0;
diff --git a/apollo-adminservice/src/main/scripts/startup.sh b/apollo-adminservice/src/main/scripts/startup.sh
index 36ce39c6028f0bded7b655bea5576a30f045487a..6efb8e8ab2e480fed5fe3cefae11398f5ada40ad 100644
--- a/apollo-adminservice/src/main/scripts/startup.sh
+++ b/apollo-adminservice/src/main/scripts/startup.sh
@@ -5,39 +5,7 @@ PATH_TO_JAR=$SERVICE_NAME".jar"
export JAVA_OPTS="-server -Xms2560m -Xmx2560m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1024m -XX:MaxNewSize=1024m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8"
export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003172/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003172/HeapDumpOnOutOfMemoryError/"
-if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
- export JAVA_HOME=/usr/java/latest/
-fi
+SERVER_PORT=8090
+SERVER_URL="http://localhost:$SERVER_PORT"
-cd `dirname $0`/..
-
-for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
-do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
-done
-
-if [[ ! -f PATH_TO_JAR && -d current ]]; then
- cd current
- for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
- do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
- done
-fi
-
-if [[ -f $SERVICE_NAME".jar" ]]; then
- rm -rf $SERVICE_NAME".jar"
-fi
-
-ln $PATH_TO_JAR $SERVICE_NAME".jar"
-chmod a+x $SERVICE_NAME".jar"
-./$SERVICE_NAME".jar" start
-
-exit 0;
+source ./common_startup.sh
diff --git a/apollo-assembly/src/assembly/adminservice/assembly-descriptor.xml b/apollo-assembly/src/assembly/adminservice/assembly-descriptor.xml
deleted file mode 100644
index 484debabd49d1f5c9c17cfe0bdb48b479c44bb62..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/assembly/adminservice/assembly-descriptor.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
- apollo-assembly
-
- zip
-
- false
-
-
-
- src/main/scripts/adminservice
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/scripts
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/config
- config
-
- apollo-assembly.conf
-
- unix
-
-
- src/main/config
- /
-
- apollo-assembly.conf
-
- unix
-
-
-
- target
- /
-
- ${project.artifactId}-*.jar
-
- 0755
-
-
-
diff --git a/apollo-assembly/src/assembly/assembly-descriptor.xml b/apollo-assembly/src/assembly/assembly-descriptor.xml
deleted file mode 100644
index 9fb594a28c1c405a82813fc4a05590264402a1f1..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/assembly/assembly-descriptor.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
- apollo-assembly
-
- zip
-
- false
-
-
-
- src/main/scripts
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/config
- config
-
- apollo-assembly.conf
-
- unix
-
-
- src/main/config
- /
-
- apollo-assembly.conf
-
- unix
-
-
-
- target
- /
-
- ${project.artifactId}-*.jar
-
- 0755
-
-
-
diff --git a/apollo-assembly/src/assembly/configservice/assembly-descriptor.xml b/apollo-assembly/src/assembly/configservice/assembly-descriptor.xml
deleted file mode 100644
index 607d5996550abdbcb7d9c0beb8c90d0f91313e2c..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/assembly/configservice/assembly-descriptor.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
- apollo-assembly
-
- zip
-
- false
-
-
-
- src/main/scripts/configservice
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/scripts
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/config
- config
-
- apollo-assembly.conf
-
- unix
-
-
- src/main/config
- /
-
- apollo-assembly.conf
-
- unix
-
-
-
- target
- /
-
- ${project.artifactId}-*.jar
-
- 0755
-
-
-
diff --git a/apollo-assembly/src/assembly/portal/assembly-descriptor.xml b/apollo-assembly/src/assembly/portal/assembly-descriptor.xml
deleted file mode 100644
index fae117ef9186b60eb9058bda994a221938bcacd1..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/assembly/portal/assembly-descriptor.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
- apollo-assembly
-
- zip
-
- false
-
-
-
- src/main/scripts/portal
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/scripts
- scripts
-
- *.sh
-
- 0755
- unix
-
-
- src/main/config
- config
-
- apollo-assembly.conf
-
- unix
-
-
- src/main/config
- /
-
- apollo-assembly.conf
-
- unix
-
-
-
- target
- /
-
- ${project.artifactId}-*.jar
-
- 0755
-
-
-
diff --git a/apollo-assembly/src/main/config/apollo-assembly.conf b/apollo-assembly/src/main/config/apollo-assembly.conf
deleted file mode 100644
index 127c1a3ff4718dd00b257367cdd6971b8172087a..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/config/apollo-assembly.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-MODE=service
-PID_FOLDER=.
-LOG_FOLDER=/opt/logs/100003171/
\ No newline at end of file
diff --git a/apollo-assembly/src/main/config/app.properties b/apollo-assembly/src/main/config/app.properties
deleted file mode 100644
index 5cbbf0a16c6772f1867e6b2587e032ee79db195d..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/config/app.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-appId=100003171
-jdkVersion=1.8
\ No newline at end of file
diff --git a/apollo-assembly/src/main/scripts/adminservice/services.sh b/apollo-assembly/src/main/scripts/adminservice/services.sh
deleted file mode 100644
index 028fe1e124859bdf70b4c3db15b6e84a7441de59..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/adminservice/services.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-SERVICES='--adminservice'
diff --git a/apollo-assembly/src/main/scripts/configservice/services.sh b/apollo-assembly/src/main/scripts/configservice/services.sh
deleted file mode 100644
index 2d2c39e3549f5766ecae2f39bef409b09309a0ed..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/configservice/services.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-SERVICES='--configservice'
diff --git a/apollo-assembly/src/main/scripts/portal/services.sh b/apollo-assembly/src/main/scripts/portal/services.sh
deleted file mode 100644
index 14bf73aaa9dcdd214e0d46e2897ea0544c072f81..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/portal/services.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-SERVICES='--portal'
diff --git a/apollo-assembly/src/main/scripts/services.sh b/apollo-assembly/src/main/scripts/services.sh
deleted file mode 100644
index 253aa099c033edd5797fa7b706a45df1ab4cfa3d..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/services.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-SERVICES='--configservice --adminservice'
diff --git a/apollo-assembly/src/main/scripts/shutdown.sh b/apollo-assembly/src/main/scripts/shutdown.sh
deleted file mode 100644
index 0eb3c1de66ae1164cf132db37dbc4c5e813efb0d..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/shutdown.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-SERVICE_NAME=apollo-assembly
-
-if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
- export JAVA_HOME=/usr/java/latest/
-fi
-
-cd `dirname $0`/..
-
-if [[ ! -f $SERVICE_NAME".jar" && -d current ]]; then
- cd current
-fi
-
-if [[ -f $SERVICE_NAME".jar" ]]; then
- chmod a+x $SERVICE_NAME".jar"
- ./$SERVICE_NAME".jar" stop
-fi
diff --git a/apollo-assembly/src/main/scripts/startup.sh b/apollo-assembly/src/main/scripts/startup.sh
deleted file mode 100644
index 0ebe5c7ed6d308185a2ef9d8f04d0fb0f2cd93ea..0000000000000000000000000000000000000000
--- a/apollo-assembly/src/main/scripts/startup.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-SERVICE_NAME=apollo-assembly
-PATH_TO_JAR=$SERVICE_NAME".jar"
-
-export JAVA_OPTS="-server -Xms4096m -Xmx4096m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=1536m -XX:MaxNewSize=1536m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8"
-export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003171/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003171/HeapDumpOnOutOfMemoryError/"
-
-if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
- export JAVA_HOME=/usr/java/latest/
-fi
-
-cd `dirname $0`/..
-
-for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
-do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
-done
-
-if [[ ! -f PATH_TO_JAR && -d current ]]; then
- cd current
- for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
- do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
- done
-fi
-
-if [[ -f $SERVICE_NAME".jar" ]]; then
- rm -rf $SERVICE_NAME".jar"
-fi
-
-source ./scripts/services.sh
-
-ln $PATH_TO_JAR $SERVICE_NAME".jar"
-chmod a+x $SERVICE_NAME".jar"
-./$SERVICE_NAME".jar" start $SERVICES
-
-exit 0;
diff --git a/apollo-configservice/src/main/scripts/common_startup.sh b/apollo-configservice/src/main/scripts/common_startup.sh
new file mode 100644
index 0000000000000000000000000000000000000000..4d7a6c205916ea44b28fac69ec5ba3e0e56675a8
--- /dev/null
+++ b/apollo-configservice/src/main/scripts/common_startup.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
+ export JAVA_HOME=/usr/java/latest/
+fi
+
+cd `dirname $0`/..
+
+for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+done
+
+if [[ ! -f PATH_TO_JAR && -d current ]]; then
+ cd current
+ for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+ do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+ done
+fi
+
+if [[ -f $SERVICE_NAME".jar" ]]; then
+ rm -rf $SERVICE_NAME".jar"
+fi
+
+ln $PATH_TO_JAR $SERVICE_NAME".jar"
+chmod a+x $SERVICE_NAME".jar"
+./$SERVICE_NAME".jar" start
+
+rc=$?;
+
+if [[ $rc != 0 ]];
+then
+ echo "Failed to start $SERVICE_NAME.jar, return code: $rc"
+ exit $rc;
+fi
+
+declare -i counter=0
+declare -i max_counter=30 # 30*5=150s
+declare -i total_time=0
+
+printf "Waiting for server startup"
+until [[ (( counter -ge max_counter )) || "$(curl --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
+do
+ printf "."
+ counter+=1
+ sleep 5
+done
+
+total_time=counter*5
+
+if [[ (( counter -ge max_counter )) ]];
+then
+ printf "\nServer failed to start in $total_time seconds!\n"
+ exit 1;
+fi
+
+printf "\nServer started in $total_time seconds!\n"
+
+exit 0;
diff --git a/apollo-configservice/src/main/scripts/startup.sh b/apollo-configservice/src/main/scripts/startup.sh
index 9e24ed137570b40711ddee6d3be2c525d6de2730..fc7dbf821c53181039d77a8ba72bbf04a65fb086 100644
--- a/apollo-configservice/src/main/scripts/startup.sh
+++ b/apollo-configservice/src/main/scripts/startup.sh
@@ -5,39 +5,7 @@ PATH_TO_JAR=$SERVICE_NAME".jar"
export JAVA_OPTS="-server -Xms5632m -Xmx5632m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=2560m -XX:MaxNewSize=2560m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8"
export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003171/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003171/HeapDumpOnOutOfMemoryError/"
-if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
- export JAVA_HOME=/usr/java/latest/
-fi
+SERVER_PORT=8080
+SERVER_URL="http://localhost:$SERVER_PORT"
-cd `dirname $0`/..
-
-for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
-do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
-done
-
-if [[ ! -f PATH_TO_JAR && -d current ]]; then
- cd current
- for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
- do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
- done
-fi
-
-if [[ -f $SERVICE_NAME".jar" ]]; then
- rm -rf $SERVICE_NAME".jar"
-fi
-
-ln $PATH_TO_JAR $SERVICE_NAME".jar"
-chmod a+x $SERVICE_NAME".jar"
-./$SERVICE_NAME".jar" start
-
-exit 0;
+source ./common_startup.sh
diff --git a/apollo-portal/src/main/scripts/common_startup.sh b/apollo-portal/src/main/scripts/common_startup.sh
new file mode 100644
index 0000000000000000000000000000000000000000..4d7a6c205916ea44b28fac69ec5ba3e0e56675a8
--- /dev/null
+++ b/apollo-portal/src/main/scripts/common_startup.sh
@@ -0,0 +1,68 @@
+#!/bin/bash
+
+if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
+ export JAVA_HOME=/usr/java/latest/
+fi
+
+cd `dirname $0`/..
+
+for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+done
+
+if [[ ! -f PATH_TO_JAR && -d current ]]; then
+ cd current
+ for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
+ do
+ if [[ ! $i == *"-sources.jar" ]]
+ then
+ PATH_TO_JAR=$i
+ break
+ fi
+ done
+fi
+
+if [[ -f $SERVICE_NAME".jar" ]]; then
+ rm -rf $SERVICE_NAME".jar"
+fi
+
+ln $PATH_TO_JAR $SERVICE_NAME".jar"
+chmod a+x $SERVICE_NAME".jar"
+./$SERVICE_NAME".jar" start
+
+rc=$?;
+
+if [[ $rc != 0 ]];
+then
+ echo "Failed to start $SERVICE_NAME.jar, return code: $rc"
+ exit $rc;
+fi
+
+declare -i counter=0
+declare -i max_counter=30 # 30*5=150s
+declare -i total_time=0
+
+printf "Waiting for server startup"
+until [[ (( counter -ge max_counter )) || "$(curl --silent --connect-timeout 1 --head $SERVER_URL | grep "Coyote")" != "" ]];
+do
+ printf "."
+ counter+=1
+ sleep 5
+done
+
+total_time=counter*5
+
+if [[ (( counter -ge max_counter )) ]];
+then
+ printf "\nServer failed to start in $total_time seconds!\n"
+ exit 1;
+fi
+
+printf "\nServer started in $total_time seconds!\n"
+
+exit 0;
diff --git a/apollo-portal/src/main/scripts/startup.sh b/apollo-portal/src/main/scripts/startup.sh
index 5c3a23ad6f7b2726aaf7657a81003a462ffc2867..8be69275d2840146ff2ad06cf74acced4c74a9bc 100644
--- a/apollo-portal/src/main/scripts/startup.sh
+++ b/apollo-portal/src/main/scripts/startup.sh
@@ -5,39 +5,7 @@ PATH_TO_JAR=$SERVICE_NAME".jar"
export JAVA_OPTS="-server -Xms8192m -Xmx8192m -Xss256k -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:NewSize=3072m -XX:MaxNewSize=3072m -XX:SurvivorRatio=22 -XX:+UseParNewGC -XX:ParallelGCThreads=4 -XX:MaxTenuringThreshold=9 -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+ScavengeBeforeFullGC -XX:+UseCMSCompactAtFullCollection -XX:+CMSParallelRemarkEnabled -XX:CMSFullGCsBeforeCompaction=9 -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -XX:SoftRefLRUPolicyMSPerMB=0 -XX:-ReduceInitialCardMarks -XX:+CMSPermGenSweepingEnabled -XX:CMSInitiatingPermOccupancyFraction=70 -XX:+ExplicitGCInvokesConcurrent -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationConcurrentTime -XX:+PrintHeapAtGC -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Duser.timezone=Asia/Shanghai -Dclient.encoding.override=UTF-8 -Dfile.encoding=UTF-8"
export JAVA_OPTS="$JAVA_OPTS -Xloggc:/opt/logs/100003173/heap_trace.txt -XX:HeapDumpPath=/opt/logs/100003173/HeapDumpOnOutOfMemoryError/"
-if [[ -z "$JAVA_HOME" && -d /usr/java/latest/ ]]; then
- export JAVA_HOME=/usr/java/latest/
-fi
+SERVER_PORT=8080
+SERVER_URL="http://localhost:$SERVER_PORT"
-cd `dirname $0`/..
-
-for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
-do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
-done
-
-if [[ ! -f PATH_TO_JAR && -d current ]]; then
- cd current
- for i in `ls $SERVICE_NAME-*.jar 2>/dev/null`
- do
- if [[ ! $i == *"-sources.jar" ]]
- then
- PATH_TO_JAR=$i
- break
- fi
- done
-fi
-
-if [[ -f $SERVICE_NAME".jar" ]]; then
- rm -rf $SERVICE_NAME".jar"
-fi
-
-ln $PATH_TO_JAR $SERVICE_NAME".jar"
-chmod a+x $SERVICE_NAME".jar"
-./$SERVICE_NAME".jar" start
-
-exit 0;
+source ./common_startup.sh