openCRX 2.0 SDK for Tomcat/LWC Step-by-Step Guide

This guide explains how to install, setup and deploy openCRX 2.0 SDK on Tomcat/LWC.

Tomcat/LWC is Apache Tomcat 6 extended by the openMDX Lightweight Container for EJBs. The extended engine deploys web modules on Tomcat 6 and the EJB modules on the openMDX Lightweight Container. Compared to a fully-fledged J2EE Application Server, Tomcat/LWC offers very simple setup, high performance and very low resource consumption. On the other hand Tomcat/LWC does not implement all features which are required for a J2EE compliant application server. We use Tomcat/LWC in this guide. However, if you prefer you can deploy the applications also on any other J2EE Application Server.

IMPORTANT: This guide assumes that openCRX 2.0 SDK is successfully setup as described in openCRX 2.0 SDK for Ant Step-by-Step.

Install Tomcat/LWC

First, download the installer executables from here:

  • openmdxTomcatLwc-2.0.0-windows-installer.exe for Windows
  • openmdxTomcatLwc-2.0.0-linux-installer.bin for Linux
Before starting the installer make sure that you have installed JDK 1.5, Apache Ant 1.7 and 7-Zip (required for Windows platforms only).

The installer first takes you to the welcome screen.

pic010.gif

On the next screen specify the installation directory. In this guide we will use the directory c:\temp\SF\openmdxTomcatLwc-2.0.0.

pic020.gif

Specify the JDK 1.5 home directory. You MUST specify the home directory of a full JDK 1.5 installation. A JRE installation is NOT sufficient!

pic030.gif

On the next screen specify the port of the Tomcat HTTP transport. 9080 should do it for most situations. Specify a different port if you already have a service running on this port.

pic040.gif

At the end of the installation the installer executes a post-installation script. If everything goes well the log should look as shown below:

pic050.gif

The installer creates shortcuts to start and stop Tomcat/LWC and an URL shortcut which launches the Tomcat/LWC welcome page. Start Tomcat/LWC now.

pic060.gif

The console output should look as shown below. Verify your output with this sample output.

HINT: on Linux systems it might be helpful to modify the shortcut so that it launches the application in a terminal window.

pic070.gif

Next try to launch the Tomcat/LWC welcome page.

pic075.gif

The welcome page looks as shown below.

pic076.gif

Finally stop Tomcat/LWC. We will need it again in a minute.

pic080.gif

Deploy openCRX

We are now ready to deploy the openCRX EARs. Copy the following files to the directory .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\deployment-units:

  • opencrx-core-CRX.ear located in directory .\opencrxSdk-2.0.0\opencrx-2.0.0\jre-1.5\core\deployment-units
  • opencrx-groupware-CRX.ear located in directory .\opencrxSdk-2.0.0\opencrx-2.0.0\jre-1.5\groupware\deployment-units
  • opencrx-store-CRX.ear located in directory .\opencrxSdk-2.0.0\opencrx-2.0.0\jre-1.5\store\deployment-units
Next extract the ZIP file to the directory .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\conf\Catalina\localhost. The archive contains the Tomcat context configuration files for the following web applications:
  • opencrx-caldav-CRX
  • opencrx-core-CRX
  • opencrx-ical-CRX
  • opencrx-imap-CRX
  • opencrx-ldap-CRX
  • opencrx-store-CRX
  • opencrx-wiki-CRX
Then we have to deploy a resource adapter configuration which defines the JDBC connection to an existing openCRX database. If you do not have an existing openCRX database it is recommended to install openCRX 2.0 Server (for more information see here). When you have an existing openCRX database do the following:

  • Select the RAR configuration located in the directory .\opencrxSdk-2.0.0\opencrx-2.0.0\core\src\connector\openmdx-2 which matches your database
  • Copy the RAR directory to the target directory .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\deployment-units
  • Open the file .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\deployment-units\your rar name\META-INF\ra.xml and adapt the values for the tags UserName, Password and ConnectionURL so that they match your database settings
  • Copy the JDBC driver JAR required for your database to the directory .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\lib.
Finally, the content of the directory conf/Catalina/localhost in apache-tomcat-6 should look as shown below:

pic100.gif

And the contents of the directory deployment-units:

pic110.gif

In a last step we have to add some users to tomcat-user.xml. They will allow us to login to openCRX. Open the file .\openmdxTomcatLwc-2.0.0\apache-tomcat-6\conf\tomcat-users.xml and add the following users and roles (IMPORTANT: add a password and complete with XML tags):

  • username="admin-Root", roles="OpenCrxRoot,manager"
  • username="admin-Standard", roles="OpenCrxAdministrator"
  • username="guest", roles="OpenCrxUser,Guest"
Finally start Tomcat/LWC by clicking the Start Tomcat LWC shortcut. This starts Tomcat/LWC and deploys all applications. The console output should look as shown below. Compare your output with this sample output.

pic120.gif

Next click in the Login Tomcat LWC shortcut. This launches a browser with the Tomcat/LWC main URL. Complete the URL by adding opencrx-core-CRX/. This opens the openCRX login page. Enter the user guest and the password which you have defined in the tomcat-users.xml.

pic130.gif

The main page of openCRX is shown after successful login.

Congratulations

Congratulations! You have successfully built and deployed openCRX 2.0 SDK on Tomcat/LWC.

Version 57.1 last modified by superadmin on 20/08/2008 at 03:42

Comments 0

No comments for this document

Attachments 18

ZIP
tomcat-contexts.zip 1.1
PostedBy: superadmin on 29/04/2008 (3kb )
Image
pic010.gif 1.1
PostedBy: superadmin on 29/04/2008 (26kb )
Image
pic120.gif 1.1
PostedBy: superadmin on 29/04/2008 (34kb )
Image
pic130.gif 1.1
PostedBy: superadmin on 29/04/2008 (44kb )
Image
pic020.gif 1.1
PostedBy: superadmin on 29/04/2008 (17kb )
Image
pic030.gif 1.1
PostedBy: superadmin on 29/04/2008 (18kb )
Image
pic040.gif 1.1
PostedBy: superadmin on 29/04/2008 (18kb )
Image
pic050.gif 1.1
PostedBy: superadmin on 29/04/2008 (13kb )
Image
pic070.gif 1.1
PostedBy: superadmin on 29/04/2008 (38kb )
Image
pic075.gif 1.1
PostedBy: superadmin on 29/04/2008 (6kb )
Image
pic076.gif 1.1
PostedBy: superadmin on 29/04/2008 (93kb )
Image
pic080.gif 1.1
PostedBy: superadmin on 29/04/2008 (6kb )
Image
pic060.gif 1.1
PostedBy: superadmin on 29/04/2008 (6kb )
Image
pic090.gif 1.1
PostedBy: superadmin on 29/04/2008 (79kb )
Image
pic100.gif 1.1
PostedBy: superadmin on 29/04/2008 (41kb )
Image
pic110.gif 1.1
PostedBy: superadmin on 29/04/2008 (36kb )
BIN
launch-tomcat.log 1.1
PostedBy: superadmin on 29/04/2008 (35kb )
BIN
launch-tomcat-minimal.log 1.1
PostedBy: superadmin on 29/04/2008 (5kb )

Creator: on 2008/08/20 03:42
openCRX is licensed under a BSD license
1.3.8295