SourceForge.net Logo

openCRX Installation Guide for BEA WebLogic Server 9.2

Version 1.10.0

logo_openCRX

www.opencrx.org





List of Figures

Figure 1: Bea WebLogic Server 9.2 Console. 6

Figure 2: Create a new JDBC data source. 8

Figure 3: Specify the database and login. 9

Figure 4: Complete creation of JDBC data source. 10

Figure 5: Deploy the datasource to a target server. 11

Figure 6: Enable WebLogic security. 12

Figure 7: Create global roles. 13

Figure 8: Add conditions. 14

Figure 9: Add groups to users. 15

Figure 10: Deploy the opencrx-core-CRX-App EAR. 16

Figure 11: Select Deploy EJBs. 17

Figure 12: Install deployment as application. 17

Figure 13: Deployment optional settings. 18

Figure 14: Verify the deployment settings. 19

Figure 15: Deployment of opencrx-core-CRX-Web.ear 20

Figure 16: Activate changes. 20

Figure 17: Deploy the Web EAR and check show me all installation options. 21

Figure 18: Enterprise applications in state Active. 21



List of Listings

Listing 1: startWebLogic.cmd with openCRX-specific properties. 7



1 About this Book

This book describes the installation of openCRX for BEA WebLogic Server 9.2.

1.1 Who this book is for

The intended audience are openCRX and application server system administrators.

1.2 What do you need to understand this book

This book describes the installation of openCRX for BEA WebLogic Server 9.2. The book assumes that you are familiar with BEA WebLogic Server 9.2 administration and deployment concepts.

1.3 Tips, Warnings, etc.

We make use the following pictograms:

Information provided as a “Tip” might be helpful for various reasons: time savings, risk reduction, etc. - it goes without saying that we advise to follow our guides meticulously

meticulous \muh-TIK-yuh-luhs\, adjective:
Extremely or excessively careful about details.

You should carefully read information marked with “Important”. Ignoring such information is typically not a good idea.

Warnings should not be ignored (risk of data loss, etc.)


2 Prerequisites

As a first you must download and install the following software:

Install BEA WebLogic Server 9.2.

Download openMDX from here (http://sourceforge.net/project/showfiles.php?group_id=75132).

Download openCRX from here (http://sourceforge.net/project/showfiles.php?group_id=95219).



BEA WebLogic Server 9.2 comes with JRE-1.5. However, download the JRE-1.4 version of openCRX and openMDX (e.g. opencrx-1.10.0-core.CRX.jre-1.4.zip).



Before you can install openCRX for WebLogic you must install the database as described in the openCRX database installation guides. If you have successfully installed the openCRX database you are ready to continue with the BEA WebLogic Server 9.2 setup.





3 Installing openCRX for Bea WebLogic Server 9.2

In a first step install WebLogic. You should be able to start and stop WebLogic and launch the WebLogic Server Console as shown below:

Figure 1: Bea WebLogic Server 9.2 Console.

The openCRX installation requires the following steps:

  • Configure properties for the JVM required by openCRX and openMDX.

  • Create and configure the datasource to access the openCRX database.

  • Configure security, i.e. global roles, groups and principals.

  • Deploy the openCRX application enterprise archives.

  • Start and test openCRX.

4 Installing Libraries

Copy the openMDX and JDBC driver libraries to a place where WebLogic has access to it. You can do this as follows:

  • Create a folder where you can store the libraries and WebLogic has access to it. E.g. create the directory ..\bea\user_projects\domains\mydomain\lib.

  • openMDX. Copy the library openmdx-kernel.jar to this newly created directory.

  • Database. Copy the JDBC libraries for your database to this newly created directory. E.g. for PostgreSQL the file is postgresql-8.1-407.jdbc3.jar.

Then you must add openCRX-specific options to the WebLogic startup script. Modify startWebLogic.cmd as shown in Listing 1. Restart WebLogic in order to activate the settings.

Listing 1: startWebLogic.cmd with openCRX-specific properties.

@ECHO OFF
@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.
SETLOCAL

set DOMAIN_HOME=C:\pgm\bea920\user_projects\domains\crx
set EXT_POST_CLASSPATH=%DOMAIN_HOME%\lib\openmdx-kernel.jar
set EXT_POST_CLASSPATH=%EXT_POST_CLASSPATH%;%DOMAIN_HOME%\lib\openmdx-weblogic.security.jar
set EXT_POST_CLASSPATH=%EXT_POST_CLASSPATH%;%DOMAIN_HOME%\lib\postgresql-8.1-407.jdbc3.jar

set JAVA_OPTIONS=
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.openmdx.compatibility.base.application.j2ee.domain=apps
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.openmdx.compatibility.base.application.j2ee.server=server1
set JAVA_OPTIONS=%JAVA_OPTIONS% -Djava.protocol.handler.pkgs=org.openmdx.kernel.url.protocol
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dorg.openmdx.log.config.filename=%DOMAIN_HOME%\server.log.properties

set MEM_ARGS=-Xms96m -Xmx1024m

call "%DOMAIN_HOME%\bin\startWebLogic.cmd" %*

ENDLOCAL



5 Configuring the Datasource

The openCRX application requires the configuration of a JDBC datasource which connects to the openCRX database. You do this a follows:

Navigate to Services > JDBC > Data Sources and click on New. Fill the fields as follows:

  • Name. CRX.

  • JNDI Name. jdbc.jdbc_opencrx_CRX. It is very important that you set the JNDI correctly. The datasource is referenced from the openCRX application by this name.

  • Database Type / Driver. Select the database type and driver from the Database Driver drop down, e.g. PostgreSQL / PostgreSQL's Driver (Type 4). Then click Next.

Figure 2: Create a new JDBC data source.

On the next screen you must configure the following properties as shown below:

  • Database Name. The name must match the name of your installed database, typically crx-CRX.

  • Host Name. Enter the host name of your database server, e.g. localhost.

  • Port. Enter the port number which is used for your database service, e.g. for PostgreSQL this is typically 5432, for Microsoft SQL Server 2000 this is typically 1433.

  • Database User Name / Password. Enter the user name and password which is used as database login.



Figure 3: Specify the database and login.

Then click Next. Verify the database connection properties on the next page as shown below and then click Test Driver Configuration.

Figure 4: Complete creation of JDBC data source.

If everything works fine you should see the Connection successful message. Click Next. On the next page you must select the servers where the new datasource should be deployed to. You must select the servers to which you plan to deploy the openCRX application. This is shown below:

Figure 5: Deploy the datasource to a target server.

6 Configuring Security

openCRX requires that each user is properly authenticated. This allows openCRX to correlate a session to user-specific application data and to perform access control. openCRX does not support non-authenticated sessions. User authentication must be configured as follows:

  • Bring up the detail page of the security realm myrealm by clicking Security Realms > myrealm.

  • Then click Users and Groups > Groups > New. You must create the following groups: OpenCrxUser, OpenCrxAdministrator, OpenCrxRoot as shown below:

Figure 6: Enable WebLogic security.



Then select Roles and Policies > Realm Roles > Global Roles. Create the roles OpenCrxRoot, OpenCrxAdministrator and OpenCrxUser as shown below:

Figure 7: Create global roles.

In a next step you must add the Caller is a member of the group membership condition to the newly created global roles as follows:

  • Select the global role OpenCrxUser and click Add Conditions. Select the predicate Group in the drop-down and then click Next. Enter OpenCrxUser in the field Group Argument Name and then click Add.

  • Select the global role OpenCrxAdministrator and click Add Conditions. Select the predicate Group in the drop-down and then click Next. Enter OpenCrxAdministrator in the field Group Argument Name and then click Add.

  • Select the global role OpenCrxRoot and click Add Conditions. Select the predicate Group in the drop-down and then click Next. Enter OpenCrxRoot in the field Group Argument Name and then click Add.

The global role OpenCrxAdministrator should then look as shown below:

Figure 8: Add conditions.

You now have successfully mapped the role names defined by openCRX to WebLogic-defined role names.

You are now ready to create users and make them member of the groups OpenCrxRoot, OpenCrxAdministrator or OpenCrxUser. The servlets in EAR opencrx-core-CRX-Web.ear require the users to be member of the groups OpenCrxUser, OpenCrxAdministrator or OpenCrxRoot. Standard users are member of the group OpenCrxUser. Segment administrators are member of the group OpenCrxAdministrator. This is shown in the figure below.

As a start add the following users:

  • admin-Root: root user which is allowed to access the Root servlet. Make it member of the group OpenCrxRoot.

  • admin-Standard: administrator for segment standard. Make the user member of the group OpenCrxAdministrator.

  • guest: guest user. Make it member of OpenCrxUser.

Figure 9: Add groups to users.



7 Deploying openCRX

openCRX comes with two enterprise application archives (EAR):

  • opencrx-core-CRX-App.ear. Contains the openCRX server components, i.e. Enterprise Java Beans.

  • opencrx-core-CRX-Web.ear. Contains the web application for openCRX users.

In a first step you deploy opencrx-core-CRX-App.ear. Select Deployments > Applications > Deploy a new Application > Upload your files. Click Browse and select the file opencrx-core-CRX-App.ear as shown below:

Figure 10: Deploy the opencrx-core-CRX-App EAR.

Repeat this step for the file opencrx-core-CRX-Web.ear. The files are now ready for deployment. Navigate to Deployments > Applications > Deploy a new Application and then to the upload directory of your administration server, e.g. domains/mydomain/myserver/upload. In this directory you should find the files you have just uploaded. Select the file opencrx-core-CRX-App.ear:

Figure 11: Select Deploy EJBs.

Then click Next. On the next screen you must select whether to install the archive as library or application. Check Install this deployment as an application as shown below:

Figure 12: Install deployment as application.

Click Next. On the next screen specify optional settings. Make sure that the security model DD only is selected as shown below. Leave the application name unchanged.

Figure 13: Deployment optional settings.

Click Next.

On the next screen specify the deployment targets and the application name. Leave the default values unchanged and then click Deploy as shown below:

Figure 14: Verify the deployment settings.



Repeat the deployment step for the archive opencrx-core-CRX-Web.ear. The summary screen should look as shown below:

Figure 15: Deployment of opencrx-core-CRX-Web.ear



Do not forget to activate the changes by clicking on Activate Changes:


Figure 16: Activate changes.

Finally, the the deployed applications should look as shown below:

Figure 17: Deploy the Web EAR and check show me all installation options.

Before you can use openCRX you must start the applications opencrx-core-CRX-App and opencrx-core-CRX-Web. Check the corresponding boxes and then select Start > Servicing all requests. Make sure that the state changes to Active as shown below:

Figure 18: Enterprise applications in state Active.



8 Final Steps

Before you proceed to the openCRX QuickStart guide make sure that you have deployed and started all applications. The application is initialized the first time a user calls the login page. If the startup fails consult the following log files:

  • WebLogic console and access logs. Located in bea\user_projects\domains\mydomain\servers\myserver and contains the console and the access log.

  • openCRX opencrx-server1…log. Located in bea\user_projects\domains\mydomain\log and contains the openCRX application log files.

License

The contents of this file are subject to a BSD license (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.opencrx.org/license.htm

Copyright 2007 © CRIXP Corp. All rights reserved.

http://www.crixp.com/ http://www.openmdx.org/