From e298272753b493afd2f4210f80a1d4e363727cc0 Mon Sep 17 00:00:00 2001 From: huangjian Date: Tue, 11 Oct 2016 16:56:18 +0800 Subject: Integrate wso2bps Change-Id: I5aca17e5a8723fa151907d52e9279568e7cdf7f1 issue-id: OCS-104 Signed-off-by: huangjian --- .../standalone/src/main/assembly/conf/wso2bpel.yml | 63 -------- .../src/main/assembly/find_kill_process.bat | 24 --- .../standalone/src/main/assembly/initDB.sh | 53 +++++++ .../standalone/src/main/assembly/run.bat | 25 +-- .../standalone/src/main/assembly/run.sh | 20 ++- .../standalone/src/main/assembly/stop.bat | 20 +-- .../standalone/src/main/assembly/stop.sh | 51 ++---- .../assembly/wso2bps-ext/bin/find_kill_process.bat | 24 +++ .../src/main/assembly/wso2bps-ext/bin/shutdown.bat | 34 ++++ .../src/main/assembly/wso2bps-ext/bin/shutdown.sh | 61 ++++++++ .../src/main/assembly/wso2bps-ext/bin/startup.bat | 40 +++++ .../src/main/assembly/wso2bps-ext/bin/startup.sh | 34 ++++ .../main/assembly/wso2bps-ext/conf/wso2bpel.yml | 63 ++++++++ .../assembly/wso2bps/bin/find_kill_process.bat | 23 +++ .../src/main/assembly/wso2bps/bin/shutdown.bat | 34 ++++ .../src/main/assembly/wso2bps/bin/shutdown.sh | 44 ++++++ .../bps/bpel/create/wso-bpel-mysql-createdb.sql | 31 ++++ .../components/lib/bpel-eventlistener-2.1.2.jar | Bin 0 -> 3661 bytes .../repository/components/lib/bpel4restlight.jar | Bin 0 -> 1194144 bytes .../lib/mysql-connector-java-5.1.39-bin.jar | Bin 0 -> 989497 bytes .../main/assembly/wso2bps/repository/conf/bps.xml | 174 +++++++++++++++++++++ .../conf/datasources/activiti-datasources.xml | 32 ++++ .../conf/datasources/bps-datasources.xml | 32 ++++ .../conf/datasources/master-datasources.xml | 68 ++++++++ 24 files changed, 780 insertions(+), 170 deletions(-) delete mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/conf/wso2bpel.yml delete mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/find_kill_process.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/initDB.sh create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/find_kill_process.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.sh create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.sh create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/conf/wso2bpel.yml create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/dbscripts/bps/bpel/create/wso-bpel-mysql-createdb.sql create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel-eventlistener-2.1.2.jar create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel4restlight.jar create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/mysql-connector-java-5.1.39-bin.jar create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/bps.xml create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/activiti-datasources.xml create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/bps-datasources.xml create mode 100644 wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/master-datasources.xml (limited to 'wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main') diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/conf/wso2bpel.yml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/conf/wso2bpel.yml deleted file mode 100644 index 0abbbbb..0000000 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/conf/wso2bpel.yml +++ /dev/null @@ -1,63 +0,0 @@ -# -# Copyright 2016 ZTE Corporation. -# -# 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. -# - -template: Hello, %s! - -# defaultName: ${DW_DEFAULT_NAME:-Stranger} - -msbServerAddr: http://127.0.0.1:80 - - -# use the simple server factory if you only want to run on a single port -#server: -# type: simple -# connector: -# type: http -# port: 8080 -server: - type: simple - rootPath: '/openoapi/wso2bpel/v1/*' - applicationContextPath: / - adminContextPath: /admin - connector: - type: http - port: 8101 - -# Logging settings. -logging: - - # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. - level: ALL - - # Logger-specific levels. - loggers: - - # Sets the level for 'com.example.app' to DEBUG. - org.openo.carbon.bpel.Wso2BpelApplication: INFO - - appenders: - - type: console - threshold: INFO - timeZone: UTC - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - - type: file - threshold: INFO - logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" - currentLogFilename: ./logs/wso2bpel-ext.log - archivedLogFilenamePattern: ./logs/zip/wso2bpel-ext-%d{yyyy-MM-dd}.log.gz - archivedFileCount: 7 - timeZone: UTC - diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/find_kill_process.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/find_kill_process.bat deleted file mode 100644 index a4a2f06..0000000 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/find_kill_process.bat +++ /dev/null @@ -1,24 +0,0 @@ -@REM -@REM Copyright 2016 ZTE Corporation. -@REM -@REM Licensed under the Apache License, Version 2.0 (the "License"); -@REM you may not use this file except in compliance with the License. -@REM 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, software -@REM distributed under the License is distributed on an "AS IS" BASIS, -@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@REM See the License for the specific language governing permissions and -@REM limitations under the License. -@REM - -echo %1 | findstr %2 >NUL -echo ERRORLEVEL=%ERRORLEVEL% -IF ERRORLEVEL 1 goto findend -for /f "tokens=1" %%a in (%1) do ( - echo kill %1 - taskkill /F /pid %%a -) -:findend \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/initDB.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/initDB.sh new file mode 100644 index 0000000..eacbaf2 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/initDB.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# +# Copyright 2016 ZTE Corporation. +# +# 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` +user=$1 +password=$2 +port=$3 +host=$4 + + +echo "start to change db ip and port" +sed -i "s|localhost|$host|" wso2bps/repository/conf/datasources/bps-datasources.xml +sed -i "s|3306|$port|" wso2bps/repository/conf/datasources/bps-datasources.xml +cat wso2bps/repository/conf/datasources/bps-datasources.xml +echo "end of change db ip and port" +echo "" + +echo "start create wso2 bpel db" +mysql -u$user -p$password -P$port -h$host <$HOME/wso2bps/dbscripts/bps/bpel/create/wso-bpel-mysql-createdb.sql +sql_result=$? +if [ $sql_result != 0 ] ; then + echo "failed to create wso2 bpel database" + exit 1 +fi + + +echo "start create wso2 bpel table" +mysql -u$user -p$password -P$port -h$host -Dwso_bpel <$HOME/wso2bps/dbscripts/bps/bpel/create/mysql.sql +sql_result=$? +if [ $sql_result != 0 ] ; then + echo "failed to create wso2 bpel table" + exit 1 +fi + +echo "init wso2 bpel database success!" +exit 0 + + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.bat index 332d1e8..253a589 100644 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.bat +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.bat @@ -15,26 +15,15 @@ @REM @echo off -title wso2bpel-service +title wso2 set RUNHOME=%~dp0 -echo ### RUNHOME: %RUNHOME% -echo ### Starting wso2bpel-service +echo ##RUNHOME %RUNHOME% -set JAVA="%JAVA_HOME%\bin\java.exe" -set port=8312 -set jvm_opts=-Xms50m -Xmx128m -rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n -set class_path=%RUNHOME%;lib\*;%RUNHOME%wso2bpel-service.jar -echo ### jvm_opts: %jvm_opts% -echo ### class_path: %class_path% -%JAVA% -classpath %class_path% %jvm_opts% org.openo.carbon.bpel.Wso2BpelApplication server %RUNHOME%conf/wso2bpel.yml +echo ### Starting wso2bps +start /D %RUNHOME%wso2bps bin\wso2server.bat + +echo ### Starting wso2bps-ext +start /D %RUNHOME%wso2bps-ext bin\startup.bat -IF ERRORLEVEL 1 goto showerror -exit -:showerror -echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! -echo After checking, press any key to close -pause -exit \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.sh index ddcfb2f..d6cf1b9 100644 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.sh +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/run.sh @@ -14,21 +14,19 @@ # limitations under the License. # + DIRNAME=`dirname $0` RUNHOME=`cd $DIRNAME/; pwd` echo @RUNHOME@ $RUNHOME -echo @JAVA_HOME@ $JAVA_HOME -JAVA="$JAVA_HOME/bin/java" -echo @JAVA@ $JAVA - -JAVA_OPTS="-Xms50m -Xmx128m" -port=8312 -#JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$port,server=y,suspend=n" -echo @JAVA_OPTS@ $JAVA_OPTS +echo "### Starting wso2bps"; +cd wso2bps +$RUNHOME/wso2bps/bin/wso2server.sh & +cd $RUNHOME -class_path="$RUNHOME/:$RUNHOME/lib/*:$RUNHOME/wso2bpel-service.jar" -echo @class_path@ $class_path -"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.carbon.bpel.Wso2BpelApplication server "$RUNHOME/conf/wso2bpel.yml" +echo "\n\n### Starting wso2bps-ext" +cd wso2bps-ext +$RUNHOME/wso2bps-ext/bin/startup.sh & +echo "### Starting wso2 end..."; diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.bat index 76b2f58..60ebad4 100644 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.bat +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.bat @@ -15,20 +15,14 @@ @REM @echo off -title stopping wso2bpel-service +title wso2 -set HOME=%~dp0 -set Main_Class="org.openo.carbon.bpel.Wso2BpelApplication" +set RUNHOME=%~dp0 +echo ##RUNHOME %RUNHOME% -echo ================== wso2bpel-service info ============================================= -echo HOME=$HOME -echo Main_Class=%Main_Class% -echo =============================================================================== -echo ### Stopping wso2bpel-service -cd /d %HOME% +echo ### Starting wso2bps +start /D %RUNHOME%wso2bps bin\shutdown.bat -for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( - call find_kill_process "%%i" %Main_Class% -) -exit \ No newline at end of file +echo ### Starting wso2bps-ext +start /D %RUNHOME%wso2bps-ext bin\shutdown.bat diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.sh index 6d5d93f..1c02784 100644 --- a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.sh +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/stop.sh @@ -14,48 +14,17 @@ # limitations under the License. # -#!/bin/bash -# -# -# Copyright 2016 [ZTE] and others. -# -# 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.openo.carbon.bpel.Wso2BpelApplication" - -echo ================== wso2bpel-service info ============================================= -echo HOME=$HOME -echo Main_Class=$Main_Class -echo =============================================================================== -cd $HOME; pwd - -echo @WORK_DIR@ $HOME +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME -function save_service_pid(){ - service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` - echo @service_pid@ $service_pid -} +echo "### Shutdown wso2bps"; +cd wso2bps +$RUNHOME/wso2bps/shutdown.sh & +cd $RUNHOME -function kill_service_process(){ - ps -p $service_pid - if [ $? == 0 ]; then - kill -9 $service_pid - fi -} -save_service_pid; -echo @C_CMD@ kill -9 $service_pid -kill_service_process; +echo "\n\n### Shutdown wso2bps-ext" +cd wso2bps-ext +$RUNHOME/wso2bps-ext/bin/shutdown.sh & +echo "### Shutdown wso2 end..."; diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/find_kill_process.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/find_kill_process.bat new file mode 100644 index 0000000..a4a2f06 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/find_kill_process.bat @@ -0,0 +1,24 @@ +@REM +@REM Copyright 2016 ZTE Corporation. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM 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, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +echo %1 | findstr %2 >NUL +echo ERRORLEVEL=%ERRORLEVEL% +IF ERRORLEVEL 1 goto findend +for /f "tokens=1" %%a in (%1) do ( + echo kill %1 + taskkill /F /pid %%a +) +:findend \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.bat new file mode 100644 index 0000000..76b2f58 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.bat @@ -0,0 +1,34 @@ +@REM +@REM Copyright 2016 ZTE Corporation. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM 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, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +@echo off +title stopping wso2bpel-service + +set HOME=%~dp0 +set Main_Class="org.openo.carbon.bpel.Wso2BpelApplication" + +echo ================== wso2bpel-service info ============================================= +echo HOME=$HOME +echo Main_Class=%Main_Class% +echo =============================================================================== + +echo ### Stopping wso2bpel-service +cd /d %HOME% + +for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( + call find_kill_process "%%i" %Main_Class% +) +exit \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.sh new file mode 100644 index 0000000..6d5d93f --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/shutdown.sh @@ -0,0 +1,61 @@ +# +# Copyright 2016 ZTE Corporation. +# +# 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. +# + +#!/bin/bash +# +# +# Copyright 2016 [ZTE] and others. +# +# 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.openo.carbon.bpel.Wso2BpelApplication" + +echo ================== wso2bpel-service info ============================================= +echo HOME=$HOME +echo Main_Class=$Main_Class +echo =============================================================================== +cd $HOME; pwd + +echo @WORK_DIR@ $HOME + +function save_service_pid(){ + service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` + echo @service_pid@ $service_pid +} + +function kill_service_process(){ + ps -p $service_pid + if [ $? == 0 ]; then + kill -9 $service_pid + fi +} + +save_service_pid; +echo @C_CMD@ kill -9 $service_pid +kill_service_process; diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.bat new file mode 100644 index 0000000..1d32352 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.bat @@ -0,0 +1,40 @@ +@REM +@REM Copyright 2016 ZTE Corporation. +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM 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, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM + +@echo off +title wso2bpel-service + +set RUNHOME=%~dp0 +echo ### RUNHOME: %RUNHOME% +echo ### Starting wso2bpel-service + +set JAVA="%JAVA_HOME%\bin\java.exe" +set port=8312 +set jvm_opts=-Xms50m -Xmx128m +rem set jvm_opts=%jvm_opts% -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=%port%,server=y,suspend=n +set class_path=%RUNHOME%;..\lib\*;%RUNHOME%..\wso2bpel-service.jar +echo ### jvm_opts: %jvm_opts% +echo ### class_path: %class_path% + +%JAVA% -classpath %class_path% %jvm_opts% org.openo.carbon.bpel.Wso2BpelApplication server %RUNHOME%../conf/wso2bpel.yml + +IF ERRORLEVEL 1 goto showerror +exit +:showerror +echo WARNING: Error occurred during startup or Server abnormally stopped by way of killing the process,Please check! +echo After checking, press any key to close +pause +exit \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.sh new file mode 100644 index 0000000..8f72352 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/bin/startup.sh @@ -0,0 +1,34 @@ +# +# Copyright 2016 ZTE Corporation. +# +# 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` +RUNHOME=`cd $DIRNAME/; pwd` +echo @RUNHOME@ $RUNHOME + +echo @JAVA_HOME@ $JAVA_HOME +JAVA="$JAVA_HOME/bin/java" +echo @JAVA@ $JAVA + +JAVA_OPTS="-Xms50m -Xmx128m" +port=8312 +#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/../lib/*:$RUNHOME/../wso2bpel-service.jar" +echo @class_path@ $class_path + +"$JAVA" $JAVA_OPTS -classpath "$class_path" org.openo.carbon.bpel.Wso2BpelApplication server "$RUNHOME/../conf/wso2bpel.yml" + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/conf/wso2bpel.yml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/conf/wso2bpel.yml new file mode 100644 index 0000000..0abbbbb --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps-ext/conf/wso2bpel.yml @@ -0,0 +1,63 @@ +# +# Copyright 2016 ZTE Corporation. +# +# 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. +# + +template: Hello, %s! + +# defaultName: ${DW_DEFAULT_NAME:-Stranger} + +msbServerAddr: http://127.0.0.1:80 + + +# use the simple server factory if you only want to run on a single port +#server: +# type: simple +# connector: +# type: http +# port: 8080 +server: + type: simple + rootPath: '/openoapi/wso2bpel/v1/*' + applicationContextPath: / + adminContextPath: /admin + connector: + type: http + port: 8101 + +# Logging settings. +logging: + + # The default level of all loggers. Can be OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL. + level: ALL + + # Logger-specific levels. + loggers: + + # Sets the level for 'com.example.app' to DEBUG. + org.openo.carbon.bpel.Wso2BpelApplication: INFO + + appenders: + - type: console + threshold: INFO + timeZone: UTC + logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" + - type: file + threshold: INFO + logFormat: "%d{yyyy-MM-dd HH:mm:ss SSS} %-5p [%c][%t] - %m%n" + currentLogFilename: ./logs/wso2bpel-ext.log + archivedLogFilenamePattern: ./logs/zip/wso2bpel-ext-%d{yyyy-MM-dd}.log.gz + archivedFileCount: 7 + timeZone: UTC + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat new file mode 100644 index 0000000..d89cf27 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/find_kill_process.bat @@ -0,0 +1,23 @@ +@REM +@REM Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE) +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM 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, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM +echo %1 | findstr %2 >NUL +echo ERRORLEVEL=%ERRORLEVEL% +IF ERRORLEVEL 1 goto findend +for /f "tokens=1" %%a in (%1) do ( + echo kill %1 + taskkill /F /pid %%a +) +:findend \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat new file mode 100644 index 0000000..d932cb7 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.bat @@ -0,0 +1,34 @@ +@REM +@REM Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE) +@REM +@REM Licensed under the Apache License, Version 2.0 (the "License"); +@REM you may not use this file except in compliance with the License. +@REM 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, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM +@echo off +title stopping WSO2 + +set HOME=%~dp0 +set Main_Class="org.wso2.carbon.bootstrap.Bootstrap" + +echo ================== WSO2 info ============================================= +echo HOME=$HOME +echo Main_Class=%Main_Class% +echo =============================================================================== + +echo ### Stopping WSO2 +cd /d %HOME% + +rem set JAVA_HOME=D:\WorkSoftware\jdk1.7.0_60 +for /f "delims=" %%i in ('"%JAVA_HOME%\bin\jcmd"') do ( + call find_kill_process "%%i" %Main_Class% +) +exit diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh new file mode 100644 index 0000000..06a0950 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/bin/shutdown.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE) +# +# 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.wso2.carbon.bootstrap.Bootstrap" + +echo ================== umc-service info ============================================= +echo HOME=$HOME +echo Main_Class=$Main_Class +echo =============================================================================== +cd $HOME; pwd + +echo @WORK_DIR@ $HOME + +function save_service_pid(){ + service_pid=`ps -ef | grep $Main_Class | grep -v grep | awk '{print $2}'` + echo @service_pid@ $service_pid +} + +function kill_service_process(){ + ps -p $service_pid + if [ $? == 0 ]; then + kill -9 $service_pid + fi +} + +save_service_pid; +echo @C_CMD@ kill -9 $service_pid +kill_service_process; \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/dbscripts/bps/bpel/create/wso-bpel-mysql-createdb.sql b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/dbscripts/bps/bpel/create/wso-bpel-mysql-createdb.sql new file mode 100644 index 0000000..16dca47 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/dbscripts/bps/bpel/create/wso-bpel-mysql-createdb.sql @@ -0,0 +1,31 @@ +-- +-- Copyright 2016 ZTE Corporation. +-- +-- 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. +-- + +/******************drop old database and user***************************/ +use mysql; +drop database IF EXISTS wso_bpel; +delete from user where User='wso_bpel'; +FLUSH PRIVILEGES; + +/******************create new database and user***************************/ +create database wso_bpel CHARACTER SET utf8; + +GRANT ALL PRIVILEGES ON wso_bpel.* TO 'wso_bpel'@'%' IDENTIFIED BY 'wso_bpel' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'wso_bpel'@'%' IDENTIFIED BY 'wso_bpel' WITH GRANT OPTION; + +GRANT ALL PRIVILEGES ON wso_bpel.* TO 'wso_bpel'@'localhost' IDENTIFIED BY 'wso_bpel' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'wso_bpel'@'localhost' IDENTIFIED BY 'wso_bpel' WITH GRANT OPTION; +FLUSH PRIVILEGES; \ No newline at end of file diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel-eventlistener-2.1.2.jar b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel-eventlistener-2.1.2.jar new file mode 100644 index 0000000..4c8837a Binary files /dev/null and b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel-eventlistener-2.1.2.jar differ diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel4restlight.jar b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel4restlight.jar new file mode 100644 index 0000000..9d6192f Binary files /dev/null and b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/bpel4restlight.jar differ diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/mysql-connector-java-5.1.39-bin.jar b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/mysql-connector-java-5.1.39-bin.jar new file mode 100644 index 0000000..dac6e14 Binary files /dev/null and b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/components/lib/mysql-connector-java-5.1.39-bin.jar differ diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/bps.xml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/bps.xml new file mode 100644 index 0000000..1e09356 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/bps.xml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 50 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/activiti-datasources.xml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/activiti-datasources.xml new file mode 100644 index 0000000..f95cb87 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/activiti-datasources.xml @@ -0,0 +1,32 @@ + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + + ACTIVITI_DB + The datasource used for activiti engine + + jdbc/ActivitiDB + + + + jdbc:h2:repository/database/activiti;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + + + + + + + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/bps-datasources.xml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/bps-datasources.xml new file mode 100644 index 0000000..22f79f7 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/bps-datasources.xml @@ -0,0 +1,32 @@ + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + BPS_DS + + + bpsds + + + + jdbc:mysql://localhost:3306/wso_bpel + wso_bpel + wso_bpel + com.mysql.jdbc.Driver + true + SELECT 1 + 30000 + false + true + 100 + 20 + 10000 + + + + + diff --git a/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/master-datasources.xml b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/master-datasources.xml new file mode 100644 index 0000000..897e335 --- /dev/null +++ b/wso2bpel-ext/wso2bpel-core/distribution/standalone/src/main/assembly/wso2bps/repository/conf/datasources/master-datasources.xml @@ -0,0 +1,68 @@ + + + + org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader + + + + + + WSO2_CARBON_DB + The datasource used for registry and user manager + + jdbc/WSO2CarbonDB + + + + jdbc:h2:repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=60000 + wso2carbon + wso2carbon + org.h2.Driver + 50 + 60000 + true + SELECT 1 + 30000 + false + + + + + + + + + + -- cgit 1.2.3-korg