From a6fefdbeabbf13f2a2fad1d7ec0e6e5d70b0dc04 Mon Sep 17 00:00:00 2001 From: Jacques Le Roux Date: Tue, 13 Oct 2009 21:30:00 +0000 Subject: [PATCH] When working with the POS I often need to use it in conjunction with back-end and sometimes even eCommerce. This Windows batch file and container configurations just allow that. startofbizBoth.bat loads the POS+EPR+eCommerce startofbizPos.bat loads only the POS I did not care to write scripts for Linux yet because I do not have any needs. I will certainly later if nobody has done it before... git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@824935 13f79535-47bb-0310-9956-ffa450edef68 --- framework/base/config/both-containers.xml | 295 +++++++++++++++++++ framework/base/config/pos-containers.xml.bak | 63 ++++ startofbizBoth.bat | 59 ++++ startofbizPos.bat | 59 ++++ 4 files changed, 476 insertions(+) create mode 100644 framework/base/config/both-containers.xml create mode 100644 framework/base/config/pos-containers.xml.bak create mode 100644 startofbizBoth.bat create mode 100644 startofbizPos.bat diff --git a/framework/base/config/both-containers.xml b/framework/base/config/both-containers.xml new file mode 100644 index 0000000000..e6bea58ae8 --- /dev/null +++ b/framework/base/config/both-containers.xml @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + %h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/base/config/pos-containers.xml.bak b/framework/base/config/pos-containers.xml.bak new file mode 100644 index 0000000000..0aeb3fbd20 --- /dev/null +++ b/framework/base/config/pos-containers.xml.bak @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/startofbizBoth.bat b/startofbizBoth.bat new file mode 100644 index 0000000000..80d33afbfa --- /dev/null +++ b/startofbizBoth.bat @@ -0,0 +1,59 @@ +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 ### Console log file +rem set OFBIZ_LOG=runtime\logs\console.log + +rem ### Delete the last log +rem del %OFBIZ_LOG% + +rem ###VM args block #################################################### +rem set MEMIF=-Xms128M -Xmx512M -XX:MaxPermSize=128m +rem # RMI settings +rem set DEBUG=-Dsun.rmi.server.exceptionTrace=true +rem # Automatic IP address for Windows +rem ipconfig | find "IP." | find /v "::" | find /v "0.0.0.0" > tmp.tmp +rem for /f "tokens=2* delims=:" %%a in (tmp.tmp) do for %%b IN (%%a) do set IPADDR=%%b +rem del tmp.tmp +rem set RMIIF=-Djava.rmi.server.hostname=%IPADDR% +rem # Not needed anymore, for history +rem set MISC=-Duser.language=en +rem set VMARGS=%MEMIF% %MISC% %DEBUG% %RMIIF% +rem #################################################################### + +rem ### Worldpay Config +rem set VMARGS=-Xbootclasspath/p:applications\accounting\lib\cryptix.jar %VMARGS% + + +rem ### Different ways of launching OFBiz ############################## +rem ### start ofbiz with previous set VMARGS +rem "%JAVA_HOME%\bin\java" %VMARGS% -jar ofbiz.jar > %OFBIZ_LOG% + +rem ### This one is for more of a debugging mode +rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ofbiz.jar > runtime\logs\console.log + +rem ### Simple easy to read line +echo on +copy framework\base\config\both-containers.xml framework\base\config\pos-containers.xml /y +"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar -pos +echo off +rem ### If you would prefer the console output to be logged rather than displayed switch out the above line for this one +rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar > runtime\logs\console.log + \ No newline at end of file diff --git a/startofbizPos.bat b/startofbizPos.bat new file mode 100644 index 0000000000..e36eb95d60 --- /dev/null +++ b/startofbizPos.bat @@ -0,0 +1,59 @@ +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 ### Console log file +rem set OFBIZ_LOG=runtime\logs\console.log + +rem ### Delete the last log +rem del %OFBIZ_LOG% + +rem ###VM args block #################################################### +rem set MEMIF=-Xms128M -Xmx512M -XX:MaxPermSize=128m +rem # RMI settings +rem set DEBUG=-Dsun.rmi.server.exceptionTrace=true +rem # Automatic IP address for Windows +rem ipconfig | find "IP." | find /v "::" | find /v "0.0.0.0" > tmp.tmp +rem for /f "tokens=2* delims=:" %%a in (tmp.tmp) do for %%b IN (%%a) do set IPADDR=%%b +rem del tmp.tmp +rem set RMIIF=-Djava.rmi.server.hostname=%IPADDR% +rem # Not needed anymore, for history +rem set MISC=-Duser.language=en +rem set VMARGS=%MEMIF% %MISC% %DEBUG% %RMIIF% +rem #################################################################### + +rem ### Worldpay Config +rem set VMARGS=-Xbootclasspath/p:applications\accounting\lib\cryptix.jar %VMARGS% + + +rem ### Different ways of launching OFBiz ############################## +rem ### start ofbiz with previous set VMARGS +rem "%JAVA_HOME%\bin\java" %VMARGS% -jar ofbiz.jar > %OFBIZ_LOG% + +rem ### This one is for more of a debugging mode +rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar ofbiz.jar > runtime\logs\console.log + +rem ### Simple easy to read line +echo on +copy framework\base\config\pos-containers.xml.bak framework\base\config\pos-containers.xml /y +"%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar -pos +echo off +rem ### If you would prefer the console output to be logged rather than displayed switch out the above line for this one +rem "%JAVA_HOME%\bin\java" -Xms128M -Xmx512M -XX:MaxPermSize=128m -jar ofbiz.jar > runtime\logs\console.log + \ No newline at end of file