summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ems/boco/conf/emsdriver.yml10
-rw-r--r--ems/boco/conf/spring.xml14
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EMSDriverApp.java1
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java (renamed from ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java)34
-rw-r--r--ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverConfiguration.java (renamed from ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverConfiguration.java)16
-rw-r--r--ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml10
-rw-r--r--ems/microservice-standalone/src/main/assembly/conf/spring.xml12
-rw-r--r--ems/microservice-standalone/src/main/assembly/run.bat8
-rw-r--r--ems/microservice-standalone/src/main/assembly/run.sh188
-rw-r--r--ems/microservice-standalone/src/main/assembly/stop.bat4
-rw-r--r--ems/microservice-standalone/src/main/assembly/stop.sh88
11 files changed, 211 insertions, 174 deletions
diff --git a/ems/boco/conf/emsdriver.yml b/ems/boco/conf/emsdriver.yml
index d88e3a1..1319656 100644
--- a/ems/boco/conf/emsdriver.yml
+++ b/ems/boco/conf/emsdriver.yml
@@ -19,7 +19,7 @@ defaultName: EmsDriver-Stranger
#microservice Bus address
msbAddress: 10.74.205.123:80
-
+autoServiceRegister: true
server:
type: simple
rootPath: '/api/emsdriver/v1/*'
@@ -38,8 +38,8 @@ logging:
# Logger-specific levels.
loggers:
- # Sets the level for 'org.openo.nfvo.monitor.dac' to INFO.
- org.onap.vfc.nfvo.emsdriver.northbound.service.EmsDriverApplication: INFO
+ # Sets the level for 'org.onap.vfc.nfvo.emsdriver' to INFO.
+ org.onap.vfc.nfvo.emsdriver.EmsDriverApplication: INFO
appenders:
- type: console
@@ -49,8 +49,8 @@ logging:
- type: file
threshold: INFO
logFormat: "%-4level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %logger{5} - %X{code} %msg %n"
- currentLogFilename: ./logs/dac.log
- archivedLogFilenamePattern: ./logs/dac-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
+ currentLogFilename: ./logs/emsdriver.log
+ archivedLogFilenamePattern: ./logs/emsdriver-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
archivedFileCount: 7
timeZone: PRC
diff --git a/ems/boco/conf/spring.xml b/ems/boco/conf/spring.xml
index c047c88..d60cc8b 100644
--- a/ems/boco/conf/spring.xml
+++ b/ems/boco/conf/spring.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="GBK"?>
<!--
- Copyright 2017 BOCO Corporation. CMCC Technologies Co., Ltd
+ Copyright 2017 BOCO Corporation. CMCC Technologies Co., Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -22,26 +22,26 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">
- <bean id="configurationManager" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationManager">
+ <bean id="configurationManager" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationManager">
<property name="run" value="true" />
</bean>
- <bean id="collectMsgReceiverThread" class="org.onap.nfvo.emsdriver.collector.CollectMsgReceiverThread">
+ <bean id="collectMsgReceiverThread" class="org.onap.vfc.nfvo.emsdriver.collector.CollectMsgReceiverThread">
<property name="run" value="true" />
<property name="thread_max_num" value="100" />
</bean>
- <bean id="configurationImp" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationImp">
+ <bean id="configurationImp" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationImp">
</bean>
- <bean id="alarmManager" class="org.onap.nfvo.emsdriver.collector.alarm.AlarmManager">
+ <bean id="alarmManager" class="org.onap.vfc.nfvo.emsdriver.collector.alarm.AlarmManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="collectManager" class="org.onap.nfvo.emsdriver.taskscheduler.CollectManager">
+ <bean id="collectManager" class="org.onap.vfc.nfvo.emsdriver.taskscheduler.CollectManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="northMessageMgr" class="org.onap.nfvo.emsdriver.northbound.client.NorthMessageMgr">
+ <bean id="northMessageMgr" class="org.onap.vfc.nfvo.emsdriver.northbound.client.NorthMessageMgr">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EMSDriverApp.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EMSDriverApp.java
index 8fcc434..943ab95 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EMSDriverApp.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EMSDriverApp.java
@@ -19,7 +19,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
-import org.onap.vfc.nfvo.emsdriver.northbound.service.EmsDriverApplication;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java
index f4919ff..dabf203 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverApplication.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverApplication.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.vfc.nfvo.emsdriver.northbound.service;
+package org.onap.vfc.nfvo.emsdriver;
import io.dropwizard.Application;
import io.dropwizard.jetty.HttpConnectorFactory;
@@ -29,14 +29,20 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.onap.vfc.nfvo.emsdriver.commons.constant.Constant;
+import org.onap.vfc.nfvo.emsdriver.commons.utils.DriverThread;
+import org.onap.vfc.nfvo.emsdriver.northbound.service.CommandResource;
import org.onap.vfc.nfvo.emsdriver.serviceregister.MsbConfiguration;
import org.onap.vfc.nfvo.emsdriver.serviceregister.MsbRestServiceProxy;
import org.onap.vfc.nfvo.emsdriver.serviceregister.model.MsbRegisterVo;
import org.onap.vfc.nfvo.emsdriver.serviceregister.model.ServiceNodeVo;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.FileSystemXmlApplicationContext;
public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
protected static Log log = LogFactory.getLog(EmsDriverApplication.class);
+ public static ApplicationContext context = null;
public static void main(String[] args) throws Exception {
new EmsDriverApplication().run(args);
@@ -50,17 +56,35 @@ public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
@Override
public void initialize(Bootstrap<EmsDriverConfiguration> bootstrap) {
// nothing to do yet
+ context = new FileSystemXmlApplicationContext("file:" + Constant.SYS_CFG+ "spring.xml");
}
@Override
public void run(EmsDriverConfiguration configuration,Environment environment) {
// register CommandResource
environment.jersey().register(new CommandResource());
-
-
MsbConfiguration.setMsbAddress(configuration.getMsbAddress());
//MSB register
- this.msbRegisteEmsDriverService(configuration);
+ String registerFlag = configuration.getAutoServiceRegister();
+ if(registerFlag.equalsIgnoreCase("false")){
+ this.msbRegisteEmsDriverService(configuration);
+ }
+ //Start workThread
+ this.startThread();
+ }
+
+ private void startThread(){
+ String[] allThreadName = context.getBeanNamesForType(DriverThread.class);
+ log.info("worker num :" + allThreadName.length);
+ for (String threadName : allThreadName) {
+ DriverThread thread = (DriverThread) context.getBean(threadName);
+ if (thread == null) {
+ log.error(threadName + "Thread start error,system exit");
+ System.exit(1);
+ }
+ thread.setName(threadName);
+ thread.start();
+ }
}
private void msbRegisteEmsDriverService(EmsDriverConfiguration configuration) {
@@ -91,4 +115,6 @@ public class EmsDriverApplication extends Application<EmsDriverConfiguration> {
log.info("register vfc-emsdriver service to msb finished.");
}
+
+
}
diff --git a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverConfiguration.java b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverConfiguration.java
index 6488739..477a901 100644
--- a/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/northbound/service/EmsDriverConfiguration.java
+++ b/ems/boco/src/main/java/org/onap/vfc/nfvo/emsdriver/EmsDriverConfiguration.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.vfc.nfvo.emsdriver.northbound.service;
+package org.onap.vfc.nfvo.emsdriver;
import io.dropwizard.Configuration;
@@ -25,8 +25,10 @@ public class EmsDriverConfiguration extends Configuration{
@NotEmpty
private String msbAddress;
+
+ private String autoServiceRegister="true";
- @NotEmpty
+ @NotEmpty
private String defaultName = "EmsDriver-Stranger";
@JsonProperty
@@ -38,6 +40,16 @@ public class EmsDriverConfiguration extends Configuration{
public void setMsbAddress(String msbAddress) {
this.msbAddress = msbAddress;
}
+
+ @JsonProperty
+ public String getAutoServiceRegister() {
+ return autoServiceRegister;
+ }
+
+ @JsonProperty
+ public void setAutoServiceRegister(String autoServiceRegister) {
+ this.autoServiceRegister = autoServiceRegister;
+ }
@JsonProperty
public String getDefaultName() {
diff --git a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
index d88e3a1..1319656 100644
--- a/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
+++ b/ems/microservice-standalone/src/main/assembly/conf/emsdriver.yml
@@ -19,7 +19,7 @@ defaultName: EmsDriver-Stranger
#microservice Bus address
msbAddress: 10.74.205.123:80
-
+autoServiceRegister: true
server:
type: simple
rootPath: '/api/emsdriver/v1/*'
@@ -38,8 +38,8 @@ logging:
# Logger-specific levels.
loggers:
- # Sets the level for 'org.openo.nfvo.monitor.dac' to INFO.
- org.onap.vfc.nfvo.emsdriver.northbound.service.EmsDriverApplication: INFO
+ # Sets the level for 'org.onap.vfc.nfvo.emsdriver' to INFO.
+ org.onap.vfc.nfvo.emsdriver.EmsDriverApplication: INFO
appenders:
- type: console
@@ -49,8 +49,8 @@ logging:
- type: file
threshold: INFO
logFormat: "%-4level [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%thread] %logger{5} - %X{code} %msg %n"
- currentLogFilename: ./logs/dac.log
- archivedLogFilenamePattern: ./logs/dac-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
+ currentLogFilename: ./logs/emsdriver.log
+ archivedLogFilenamePattern: ./logs/emsdriver-%d{yyyyMMdd}-%d{HHmm}-%d{ssSSS}.log.gz
archivedFileCount: 7
timeZone: PRC
diff --git a/ems/microservice-standalone/src/main/assembly/conf/spring.xml b/ems/microservice-standalone/src/main/assembly/conf/spring.xml
index c047c88..6813ce8 100644
--- a/ems/microservice-standalone/src/main/assembly/conf/spring.xml
+++ b/ems/microservice-standalone/src/main/assembly/conf/spring.xml
@@ -22,26 +22,26 @@
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
default-lazy-init="true">
- <bean id="configurationManager" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationManager">
+ <bean id="configurationManager" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationManager">
<property name="run" value="true" />
</bean>
- <bean id="collectMsgReceiverThread" class="org.onap.nfvo.emsdriver.collector.CollectMsgReceiverThread">
+ <bean id="collectMsgReceiverThread" class="org.onap.vfc.nfvo.emsdriver.collector.CollectMsgReceiverThread">
<property name="run" value="true" />
<property name="thread_max_num" value="100" />
</bean>
- <bean id="configurationImp" class="org.onap.nfvo.emsdriver.configmgr.ConfigurationImp">
+ <bean id="configurationImp" class="org.onap.vfc.nfvo.emsdriver.configmgr.ConfigurationImp">
</bean>
- <bean id="alarmManager" class="org.onap.nfvo.emsdriver.collector.alarm.AlarmManager">
+ <bean id="alarmManager" class="org.onap.vfc.nfvo.emsdriver.collector.alarm.AlarmManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="collectManager" class="org.onap.nfvo.emsdriver.taskscheduler.CollectManager">
+ <bean id="collectManager" class="org.onap.vfc.nfvo.emsdriver.taskscheduler.CollectManager">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
- <bean id="northMessageMgr" class="org.onap.nfvo.emsdriver.northbound.client.NorthMessageMgr">
+ <bean id="northMessageMgr" class="org.onap.vfc.nfvo.emsdriver.northbound.client.NorthMessageMgr">
<property name="run" value="true" />
<property name="configurationInterface" ref="configurationImp" />
</bean>
diff --git a/ems/microservice-standalone/src/main/assembly/run.bat b/ems/microservice-standalone/src/main/assembly/run.bat
index 391cd13..284f5f8 100644
--- a/ems/microservice-standalone/src/main/assembly/run.bat
+++ b/ems/microservice-standalone/src/main/assembly/run.bat
@@ -19,10 +19,10 @@ title dac-service
set RUNHOME=%~dp0
echo ### RUNHOME: %RUNHOME%
-echo ### Starting dac-service
+echo ### Starting emsdriver-service
cd /d %RUNHOME%
-rem set JAVA_HOME=D:\JDK1.7\jdk\jdk\windows
+rem set JAVA_HOME=D:\JDK1.8\jdk\jdk\windows
set JAVA="%JAVA_HOME%\bin\java.exe"
set jvm_opts=-Xms50m -Xmx128m
@@ -47,11 +47,11 @@ set date_time_string=%date_time_string:|=-%
set jvm_opts=%jvm_opts% -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=%RUNHOME%logs\dump-dac-%date_time_string%.hprof
-set class_path=%RUNHOME%;%RUNHOME%dac.jar
+set class_path=%RUNHOME%;%RUNHOME%boco-driver.jar
echo ### jvm_opts: %jvm_opts%
echo ### class_path: %class_path%
-%JAVA% -classpath %class_path% %jvm_opts% org.onap.vfc.nfvo.emsdriver.EMSDriverApp server %RUNHOME%conf/emsdriver.yml
+%JAVA% -classpath %class_path% %jvm_opts% org.onap.vfc.nfvo.emsdriver.EmsDriverApplication server %RUNHOME%conf/emsdriver.yml
IF ERRORLEVEL 1 goto showerror
exit
diff --git a/ems/microservice-standalone/src/main/assembly/run.sh b/ems/microservice-standalone/src/main/assembly/run.sh
index 8f3681f..32678f6 100644
--- a/ems/microservice-standalone/src/main/assembly/run.sh
+++ b/ems/microservice-standalone/src/main/assembly/run.sh
@@ -1,94 +1,94 @@
-#
-# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
-#
-# Licensed 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.
-#
-#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
-
-DIRNAME=`dirname $0`
-RUNHOME=`cd $DIRNAME/; pwd`
-export RUNHOME
-echo @RUNHOME@ $RUNHOME
-cd $RUNHOME
-# JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
-echo @JAVA_HOME@ $JAVA_HOME
-JAVA="$JAVA_HOME/bin/java"
-echo @JAVA@ $JAVA
-
-JAVA_OPTS="-Xms50m -Xmx128m"
-
-OSNAME=`uname`
-if [ $OSNAME = "Linux" ]; then
- PLATFORM=`uname -p`
- if [ $PLATFORM = "x86_64" ] ;then
- if [ -d $JAVA_HOME/jre/lib/i386 ]; then
- echo "This is a 32-bit JVM runs on 64-bit system."
- library="$RUNHOME/conf/system/native/linux"
- else
- echo "This is a 64-bit JVM runs on 64-bit system."
- library="$RUNHOME/conf/system/native/linux-x86-64"
- fi
- elif [ $PLATFORM = "ia64" ] ;then
- library="$RUNHOME/conf/system/native/linux-ia64"
- else
- library="$RUNHOME/conf/system/native/linux"
- fi
-fi
-
-if [ $OSNAME = "SunOS" ] ;then
- PLATFORM=`uname -p`
- if [ $PLATFORM = "i386" ] ;then
- library="$RUNHOME/conf/system/native/solaris-x86-32"
- fi
-
- if [ $PLATFORM = "sparc" ] ;then
- SYS_BIT=`isainfo -b`
- echo $SYS_BIT
- if [ $SYS_BIT = "64" ] ;then
- JAVA_OPTS="$JAVA_OPTS -d64"
- library="$RUNHOME/conf/system/native/solaris64"
- else
- library="$RUNHOME/conf/system/native/solaris"
- fi
- fi
-fi
-
-if [ $OSNAME = "AIX" ] ;then
- PLATFORM=`uname -p`
- if [ $PLATFORM = "powerpc" ] ;then
- library="$RUNHOME/conf/system/native/aix-64"
- fi
-fi
-
-JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$library"
-
-date_time_string=`date +%Y-%m-%d-%H-%M-%S`
-if [ $OSNAME != "AIX" ] ;then
-dump_file_name="dump-dac-$date_time_string.hprof"
-JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$RUNHOME/logs/$dump_file_name"
-else
-JAVA_OPTS="$JAVA_OPTS -Xdump:none"
-JAVA_OPTS="$JAVA_OPTS -Xdump:system:events=gpf+abort+traceassert,range=1..0,priority=999,request=serial,label=$RUNHOME/logs/core-dac-$date_time_string.dmp"
-JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=systhrow,filter=java/lang/OutOfMemoryError,range=1..1,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-$date_time_string.phd"
-JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=user,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-user-$date_time_string.phd"
-fi
-
-# set remote debug
-# port=8306
-# JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
-echo @JAVA_OPTS@ $JAVA_OPTS
-
-class_path="$RUNHOME/:$RUNHOME/boco-driver.jar"
-echo @class_path@ $class_path
-
-"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EMSDriverApp server "$RUNHOME/conf/emsdriver.yml"
+#
+# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
+#
+# Licensed 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.
+#
+#JAVA_HOME="/home/conductortest/jdk1.7/jdk/linux"
+
+DIRNAME=`dirname $0`
+RUNHOME=`cd $DIRNAME/; pwd`
+export RUNHOME
+echo @RUNHOME@ $RUNHOME
+cd $RUNHOME
+# JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s:/bin/javac::")
+echo @JAVA_HOME@ $JAVA_HOME
+JAVA="$JAVA_HOME/bin/java"
+echo @JAVA@ $JAVA
+
+JAVA_OPTS="-Xms50m -Xmx128m"
+
+OSNAME=`uname`
+if [ $OSNAME = "Linux" ]; then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "x86_64" ] ;then
+ if [ -d $JAVA_HOME/jre/lib/i386 ]; then
+ echo "This is a 32-bit JVM runs on 64-bit system."
+ library="$RUNHOME/conf/system/native/linux"
+ else
+ echo "This is a 64-bit JVM runs on 64-bit system."
+ library="$RUNHOME/conf/system/native/linux-x86-64"
+ fi
+ elif [ $PLATFORM = "ia64" ] ;then
+ library="$RUNHOME/conf/system/native/linux-ia64"
+ else
+ library="$RUNHOME/conf/system/native/linux"
+ fi
+fi
+
+if [ $OSNAME = "SunOS" ] ;then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "i386" ] ;then
+ library="$RUNHOME/conf/system/native/solaris-x86-32"
+ fi
+
+ if [ $PLATFORM = "sparc" ] ;then
+ SYS_BIT=`isainfo -b`
+ echo $SYS_BIT
+ if [ $SYS_BIT = "64" ] ;then
+ JAVA_OPTS="$JAVA_OPTS -d64"
+ library="$RUNHOME/conf/system/native/solaris64"
+ else
+ library="$RUNHOME/conf/system/native/solaris"
+ fi
+ fi
+fi
+
+if [ $OSNAME = "AIX" ] ;then
+ PLATFORM=`uname -p`
+ if [ $PLATFORM = "powerpc" ] ;then
+ library="$RUNHOME/conf/system/native/aix-64"
+ fi
+fi
+
+JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$library"
+
+date_time_string=`date +%Y-%m-%d-%H-%M-%S`
+if [ $OSNAME != "AIX" ] ;then
+dump_file_name="dump-dac-$date_time_string.hprof"
+JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$RUNHOME/logs/$dump_file_name"
+else
+JAVA_OPTS="$JAVA_OPTS -Xdump:none"
+JAVA_OPTS="$JAVA_OPTS -Xdump:system:events=gpf+abort+traceassert,range=1..0,priority=999,request=serial,label=$RUNHOME/logs/core-dac-$date_time_string.dmp"
+JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=systhrow,filter=java/lang/OutOfMemoryError,range=1..1,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-$date_time_string.phd"
+JAVA_OPTS="$JAVA_OPTS -Xdump:heap:events=user,priority=500,request=exclusive+compact+prepwalk,label=$RUNHOME/logs/dump-dac-user-$date_time_string.phd"
+fi
+
+# set remote debug
+# port=8306
+# JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n"
+echo @JAVA_OPTS@ $JAVA_OPTS
+
+class_path="$RUNHOME/:$RUNHOME/boco-driver.jar"
+echo @class_path@ $class_path
+
+"$JAVA" $JAVA_OPTS -classpath "$class_path" org.onap.vfc.nfvo.emsdriver.EMSDriverApp server "$RUNHOME/conf/emsdriver.yml"
diff --git a/ems/microservice-standalone/src/main/assembly/stop.bat b/ems/microservice-standalone/src/main/assembly/stop.bat
index 1eadbf8..73f9673 100644
--- a/ems/microservice-standalone/src/main/assembly/stop.bat
+++ b/ems/microservice-standalone/src/main/assembly/stop.bat
@@ -19,12 +19,12 @@ title stopping dac-service
set HOME=%~dp0
set Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"
-echo ================== dac-service info =============================================
+echo ================== emsdriver-service info =============================================
echo HOME=$HOME
echo Main_Class=%Main_Class%
echo ===============================================================================
-echo ### Stopping dac-service
+echo ### Stopping emsdriver-service
cd /d %HOME%
rem set JAVA_HOME=D:\WorkSoftware\jdk1.7.0_60
diff --git a/ems/microservice-standalone/src/main/assembly/stop.sh b/ems/microservice-standalone/src/main/assembly/stop.sh
index d5d8d61..d011f0d 100644
--- a/ems/microservice-standalone/src/main/assembly/stop.sh
+++ b/ems/microservice-standalone/src/main/assembly/stop.sh
@@ -1,44 +1,44 @@
-#!/bin/bash
-#
-# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
-#
-# Licensed 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.
-#
-
-DIRNAME=`dirname $0`
-HOME=`cd $DIRNAME/; pwd`
-Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"
-
-echo ================== umc-service info =============================================
-echo HOME=$HOME
-echo Main_Class=$Main_Class
-echo ===============================================================================
-cd $HOME; pwd
-
-echo @WORK_DIR@ $HOME
-
-save_service_pid(){
- service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'`
- echo @service_pid@ $service_pid
-}
-
-kill_service_process(){
- ps -p $service_pid
- if [ $? -eq 0 ]; then
- kill -9 $service_pid
- fi
-}
-
-save_service_pid;
-echo @C_CMD@ kill -9 $service_pid
-kill_service_process;
+#!/bin/bash
+#
+# Copyright (C) 2015 CMCC, Inc. and others. All rights reserved. (CMCC)
+#
+# Licensed 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.
+#
+
+DIRNAME=`dirname $0`
+HOME=`cd $DIRNAME/; pwd`
+Main_Class="org.onap.vfc.nfvo.emsdriver.EMSDriverApp"
+
+echo ================== emsdriver-service info =============================================
+echo HOME=$HOME
+echo Main_Class=$Main_Class
+echo ===============================================================================
+cd $HOME; pwd
+
+echo @WORK_DIR@ $HOME
+
+save_service_pid(){
+ service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'`
+ echo @service_pid@ $service_pid
+}
+
+kill_service_process(){
+ ps -p $service_pid
+ if [ $? -eq 0 ]; then
+ kill -9 $service_pid
+ fi
+}
+
+save_service_pid;
+echo @C_CMD@ kill -9 $service_pid
+kill_service_process;