git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@674572 13f79535-47bb-0310-9956-ffa450edef68
114 lines
6.9 KiB
Plaintext
114 lines
6.9 KiB
Plaintext
<#--
|
|
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
|
|
Refer to the Guidelines in the OFBiz documentation : http://docs.ofbiz.org/x/Ah
|
|
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)
|
|
|
|
=======================================================================================================================================================
|
|
In function of your OS, copy in the geronimo script (.sh or .bat), the 2 lines below in (at the top)
|
|
of the doneSetArgs section (Windows)
|
|
or the <<elif [ "$1" = "run" ]>> block (Linux)
|
|
|
|
For the ofbiz.home value:
|
|
On Windows dont' worry about the /or \ in , they work both.
|
|
On Linux depending on your distribution you might need to put inside quotes around the ofbizHome value, then don't forget to escape them
|
|
For instance on Ubuntu 6.06 LTS inside quotes are needed, but don't put them for Suze 10...
|
|
|
|
Note :
|
|
If you prefer on WASCE you may use the setven scvript to set your env value. Notably if you want to separate things and have more var to set
|
|
Then copy the 2 lines below in the setJavaOpts section (Windows) or somewhere in the setEnv script you will find in GERONIMO_HOME/bin (Linux)
|
|
This script does not exist in Geronimo but is anticipated and taken into account.
|
|
If you need it, you may concatenate pre-existing JAVA_OPTS, same for CLASSPATH. But it's not needed for OFBiz alone.
|
|
=======================================================================================================================================================
|
|
|
|
<#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}"
|
|
|
|
|
|
=======================================================================================================================================================
|
|
Change also this line of the geronimo script in the doneSetArgs section (Windows) or in the <<elif [ "$1" = "run" ]>> block (Linux)
|
|
=======================================================================================================================================================
|
|
Windows
|
|
-------
|
|
Replace the line
|
|
%_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%
|
|
by
|
|
%_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
|
|
-----
|
|
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 "$@"
|
|
|
|
|
|
=======================================================================================================================================================
|
|
If you want to use RMI (RMIDispatcher) you will need to put the following lines in the limited-containers.xml file (set the values as you want)
|
|
<property name="bound-host" value="127.0.0.1"/>
|
|
<property name="bound-port" value="1099"/>
|
|
|
|
You will need also to change the value of use-initial-context to false and to put the complete path for ssl-keystore.
|
|
|
|
Finally you will have to set a security manager using the option -Djava.security.manager and
|
|
pass a client policy to the application server using the -Djava.security.policy=client.policy parameter,
|
|
simply put it at the end of JAVA_OPTS above.
|
|
Indeed to load the RMIDispatcher under the application server it needs a RMI Security Manager.
|
|
For my test I used a very simple client.policy file with all permissions that I put in the bin directory of the application server.
|
|
Its content is :
|
|
grant{
|
|
permission java.security.AllPermission;
|
|
};
|
|
|
|
To work cleanly on Windows you will also have to add the option -DXorg.apache.geronimo.JarFileClassLoader=false
|
|
see https://issues.apache.org/jira/browse/GERONIMO-4037 for more.
|
|
|
|
Debug stuff : -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
|
|
You may got this issue when shutting down : ERROR: transport error 202: bind failed: Address already in use ["transport.c",L41]
|
|
But you can neglect and force stopping
|
|
|
|
*** Also beware, you can't have spaces in the path where the application server is installed ***
|
|
And last but not least you may appreciate http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-HowtouseRMIwithoutSSL
|
|
=======================================================================================================================================================
|
|
|
|
Derby
|
|
-----
|
|
If you are using the embedded Derby database you should consider this.
|
|
OFBiz creates 2 folders for the Derby Database under the runtime directory: ofbiz and ofbizolap, these contain all the setup data for OFBiz.
|
|
If you run Geronimo, under your Geronimo bin directory you will see the 2 same directories.
|
|
But those will not contain any data as you are not running OFBiz with the necessary parameters (you are running Geronimo, not OFBiz).
|
|
Simply replace the 2 directories: ofbiz & ofbizolap in your Geronimo bin directory by the 2 directories from your OFBiz runtime directory.
|