Chapter 3. Installing openCRX for JBoss
In a first step you must install JBoss by extracting the delivered JBoss distribution to your program directory, e.g. d:\pgm\jboss-4.0.1 on Windows or /opt/jboss on Linux or any other Posix OS.
Make sure that you add JAVA_HOME to your system environment variables, e.g. JAVA_HOME=D:\pgm\j2sdk1.4.2 on Windows or JAVA_HOME=/usr/java/j2sdk1.4.2 on Linux. JAVA_HOME is required by JBoss in order to compile JSPs.
.
Next you must deploy openCRX to JBoss. You do this by copying several files to the JBoss deploy directory:
If you are upgrading from any version older than openCRX v1.3.0 you must remove/delete the file openmdx-base.jar from the directory d:\pgm\jboss-4.0.1\server\default\lib.
Copy the appropriate database JDBC driver to the directory d:\pgm\jboss-4.0.1\server\default\lib. The openCRX database installation manual describes how to download the drivers (e.g. for MySQL the JDBC driver comes as mysql-connector-java-3.0.16.jar)
Copy the file opencrx-core-CRX-App.ear contained in the openCRX distribution to the directory d:\pgm\jboss-4.0.1\server\default\deploy on Windows or /opt/jboss/server/default/deploy on Linux
Copy the file opencrx-core-CRX-web.ear contained in the openCRX distribution to the directory d:\pgm\jboss-4.0.1\server\default\deploy on Windows or /opt/jboss/server/default/deploy on Linux. You can also open opencrx-core-CRX-web.ear with a ZIP utility and extract the content to the directory d:\pgm\jboss-4.0.1\server\default\deploy\opencrx-core-CRX-web.ear on Windows or /opt/jboss/server/default/deploy/opencrx-core-CRX-web-ear on Linux. If you want to edit the content of the file opencrx-core-CRX.war without the zip/unzip roundtrip you can also extract the content of that file with a ZIP utility.
Copy the file opencrx-core-CRX-Root-web.ear contained in the openCRX distribution to the directory d:\pgm\jboss-4.0.1\server\default\deploy on Windows or /opt/jboss/server/default/deploy on Linux. You can also open opencrx-core-CRX-Root-web.ear with a ZIP utility and extract the content to the directory d:\pgm\jboss-4.0.1\server\default\deploy\opencrx-core-CRX-Root-web.ear on Windows or /opt/jboss/server/default/deploy/opencrx-core-CRX-Root-web-ear on Linux. If you want to edit the content of the file opencrx-core-CRX-Root.war without the zip/unzip roundtrip you can also extract the content of that file with a ZIP utility.
Install the datasource configuration file, e.g. copy the file jdbc-opencrx-CRX-mysql-ds.xml (if you use openCRX with MySQL) contained in the file opencrx-core.jboss-3-connector.zip of the openCRX distribution to the directory d:\pgm\jboss-4.0.1\server\default\deploy on Windows or /opt/jboss/server/default/deploy on Linux.
Create the file d:\pgm\jboss-4.0.1\server\default\server.log.properties on Windows or /opt/jboss/server/default/server.log.properties on Linux with the following content.
Example 3-1. listing of server.log.properties.
ApplicationId = openCRX
LogFileExtension = log
LogFilePath = D:/pgm/jboss-4.0.1/server/default/log/
LogLevel = warning
java.LoggingMechanism = SharedDatedFileLoggingMechanism
Adapt D:/pgm/jboss-4.0.1 to your environment!
Next you must set a few Java VM options which are required for the openMDX application framework.
On Windows add the following lines to d:\pgm\jboss-4.0.1\bin\run.bat after the lines indicated below. Also uncomment the line set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m. This gives more memory to the Java VM (and depending on your environment you may want to increase the value of the option Xmx).
Example 3-2. Java VM options required for openMDX on Windows
rem Sun JVM memory allocation pool parameters. Uncomment and modify as appropriate.
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m
rem Setup openMDX-specific properties
set JAVA_OPTS=%JAVA_OPTS% -Dorg.openmdx.compatibility.base.application.j2ee.domain=apps
set JAVA_OPTS=%JAVA_OPTS% -Dorg.openmdx.compatibility.base.application.j2ee.server=server1
set JAVA_OPTS=%JAVA_OPTS% -Djava.protocol.handler.pkgs=org.openmdx.kernel.url.protocol
set JAVA_OPTS=%JAVA_OPTS% -Dorg.openmdx.log.config.filename=D:\pgm\jboss-4.0.1\server\default\server.log.properties
set JAVA_OPTS=%JAVA_OPTS% -Dmail.SSLSocketFactory.class=org.opencrx.kernel.mail.SendMailSSLSocketFactory
Adapt D:\pgm\jboss-4.0.1 to your environment!
Make sure that there are no line breaks in the set commands. Each -D options is of the form -Dname=value and must be on a single line.
On Linux add the following lines to /opt/jboss/bin/run.conf towards the end of the file.
Example 3-3. Java VM options required for openMDX on Linux
# Setup openMDX-specific properties
JAVA_OPTS="$JAVA_OPTS -Xms128m -Xmx512m"
JAVA_OPTS="$JAVA_OPTS -Dorg.openmdx.compatibility.base.application.j2ee.domain=apps"
JAVA_OPTS="$JAVA_OPTS -Dorg.openmdx.compatibility.base.application.j2ee.server=server1"
JAVA_OPTS="$JAVA_OPTS -Djava.protocol.handler.pkgs=org.openmdx.kernel.url.protocol"
JAVA_OPTS="$JAVA_OPTS -Dorg.openmdx.log.config.filename=/opt/jboss/server/default/server.log.properties"
JAVA_OPTS="$JAVA_OPTS -Dmail.SSLSocketFactory.class=org.opencrx.kernel.mail.SendMailSSLSocketFactory"
Adapt /opt/jboss/server/default/ to your environment!
Make sure that there are no line breaks inside options. Each -D options is of the form -Dname=value and must be on a single line.