<#--
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.
-->
Websphere Application Server Community Edition (WASCE) 2
or Geronimo 2.0.3 Setup - 2008-04-08 - Jacques Le Roux
To use OFBiz with WASCE 2 or Geronimo 2.0.3 follow the following steps (all steps assume WASCE 2 or Geronimo 2.0.3 is already installed and working)
=======================================================================================================================================================
If you use WASCE, copy the 2 lines below in the setJavaOpts section (Windows) or somewhere in the setEnv script you will find in GERONIMO_HOME/bin
If you use Geronimo, simply put these 2 lines at the top of the setArgs section (Windows) or somewhere in the Geronimo script.
If you need it, you may concatenate pre-existing JAVA_OPTS, same for CLASSPATH. But it's not needed for OFBiz alone.
On Windows dont' worry about the /or \ in ofbiz.home, they work both.
=======================================================================================================================================================
<#assign classpath = ""/>
<#list classpathDirs as dir>
<#assign classpath = classpath + dir + pathSeparatorChar/>
</#list>
<#assign classpath = classpath?substring(0, classpath?length - 1)/>
Windows
-------
set JAVA_OPTS=-Dofbiz.home="${ofbizHome}" -Xms256M -Xmx512M -XX:MaxPermSize=128M -Duser.language=en
set CLASSPATH=${classpath}
Linux
-----
Add this 2 lines after the
elif [ "$1" = "run" ]; then
line
JAVA_OPTS="-Dofbiz.home="${ofbizHome}" -Xms256M -Xmx512M -XX:MaxPermSize=128M -Duser.language=en"
CLASSPATH="${classpath}"
Don't forget to escape the inside quotes in ${ofbizHome}.
=======================================================================================================================================================
Change also this line of the geronimo script in the doneSetArgs section (Windows) or somewhere in the geronimo script
=======================================================================================================================================================
Windows
-------
%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Djava.ext.dirs="%GERONIMO_BASE%\lib\ext;%JRE_HOME%\lib\ext" -Djava.endorsed.dirs="%GERONIMO_BASE%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -jar %_JARFILE% %_LONG_OPT% %CMD_LINE_ARGS%
to
%_EXECJAVA% %JAVA_OPTS% %GERONIMO_OPTS% %JAVA_AGENT_OPTS% -Djava.ext.dirs="%GERONIMO_BASE%\lib\ext;%JRE_HOME%\lib\ext" -Djava.endorsed.dirs="%GERONIMO_BASE%\lib\endorsed;%JRE_HOME%\lib\endorsed" -Dorg.apache.geronimo.base.dir="%GERONIMO_BASE%" -Djava.io.tmpdir="%GERONIMO_TMPDIR%" -cp .;%_JARFILE%;%CLASSPATH% %_LONG_OPT% %CMD_LINE_ARGS% %MAINCLASS%
Linux
-----
In the <<elif [ "$1" = "run" ]>> block
Replace the line
-jar "$GERONIMO_HOME"/bin/server.jar $LONG_OPT "$@"
by
-classpath ".":"$GERONIMO_HOME"/bin/server.jar:"$CLASSPATH" org.apache.geronimo.cli.daemon.DaemonCLI $LONG_OPT "$@"
=======================================================================================================================================================
Windows only
------------
If you want to use OFBiz multi-instances in Geronimo or WASCE using you might put "exit" as last line in the deploy script.
Else, of course you may also type exit by hand....
Alternatively you may not put exit at the end of the deploy script,
choose to not have pause in script and type "exit" yourself in the command windows (actually I found later that it's an easier way)
=======================================================================================================================================================