Deploying and Configuring with JBoss

This section explains how to configure and deploy the Semarchy Convergence for MDM Application with JBoss Application Server.

In this section, <jboss_home> refers to the JBoss server installation folder.

Note: Refer to the JBoss Documentation for your JBoss version for more details about the deployment and configuration processes in JBoss.

Specific Configuration Steps for JBoss

JBoss 5

The JBoss 5 web service native stack is not supported by Semarchy. It needs to be replaced by JBossWS-CXF.

To install CXF:

  1. Download the latest binaries of JBossWS-CXF from http://www.jboss.org/jbossws/downloads.
  2. Uncompress the downloaded file to the temp folder.
  3. From the jbossws-cxf-bin-dist sub-directory, save the ant.properties.example file as ant.properties.
  4. Edit this file and change the values for jboss510.home, jbossws.integration.target, jboss.server.instance, jboss.bind.address according to your JBoss configuration. For example:
  5. From the jbossws-cxf-bin-dist directory, install JBossWS-CXF by running the ANT build script:

JBoss 6

This version of JBoss is configured by default to delete the application working directory when the server is restarted. This behavior is similar to redeploying the original application at server startup. With this behavior, plug-ins added to the Semarchy application disappear when the server restarts.

To prevent this effect, the JBoss 6 configuration needs to be changed.

To configure work directory deletion to false:

  1. Edit the <jboss_home>/server/configuration/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml file.
  2. Modify the following entry to have the property set to false :
  3. Save the file.

Installing Additional Libraries

Installing the Oracle JDBC Driver for JBoss 5 and 6

To install the Oracle JDBC driver for JBoss 5 and 6:

  1. Copy the oracle driver file ( ojdbc6.jar) in the <jboss_home>/server/configuration/lib directory.

Installing the Oracle JDBC Driver for JBoss 7

To install the Oracle JDBC driver for JBoss 7:

  1. Copy the oracle driver file ( ojdbc6.jar) in the <jboss_home>/standalone/deployments directory.

Configuring the Security

Warning: The configuration in this section uses the UsersRolesLoginModule (properties file based login module) and may be changed to a stronger authentication mechanism.

Configuring the Security Realm and Semarchy Administrator for JBoss 5 and 6

To configure the security realm for JBoss 5 and 6:

  1. Create a <jboss_home>/server/configuration/conf/props/semarchy-users.properties file with the following user and password definition:
  2. Create a <jboss_home>/server/configuration/conf/props/semarchy-roles.properties file with the following user/role mapping:
  3. Edit the <jboss_home>/server/configuration/conf/login-config.xml and add the section given below.
<!-- Sample configuration for the semarchy realm. -->
<application-policy name="SemarchyRealm">
 <authentication>
  <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
    	flag="required">
   <module-option
    name="usersProperties">props/semarchy-users.properties</module-option>
   <module-option
    name="rolesProperties">props/semarchy-roles.properties</module-option>
  </login-module>
 </authentication>
</application-policy>

Configuring the Security Realm and Semarchy Administrator for JBoss 7

To configure the security realm for JBoss 7:

  1. Create a <jboss_home>/standalone/configuration/semarchy-users.properties file with the following user and password definition:
  2. Create a <jboss_home>/standalone/configuration/semarchy-roles.properties file with the following user/role mapping:
  3. Edit the <jboss_home>/standalone/configuration/standalone.xml and add the section given below in the <subsystem xmlns="urn:jboss:domain:security:1.0"><security-domains> configuration element .
<!-- Sample configuration for the semarchy application. -->
<security-domain name="SemarchyRealm" cache-type="default">
 <authentication>
  <login-module code="UsersRoles" flag="required">
   <module-option name="usersProperties"
    value="<jboss_home>/standalone/configuration/semarchy-users.properties"/>   					
   <module-option name="rolesProperties" 
    value="<jboss_home>/standalone/configuration/semarchy-roles.properties"/>
  </login-module>
 </authentication>
</security-domain>

Setting up the Datasources

Setting up the Datasources for JBoss 5 and 6

To configure the repository datasource:

  1. Create a <jboss_home>/server/configuration/deploy/semarchy_repository.xml file based on the template given below. Make sure to modify the connection-url, user-name and password elements to match your repository schema connection information.
<datasources>
 <no-tx-datasource>
  <jndi-name>jdbc/SEMARCHY_REPOSITORY</jndi-name>
  <connection-url>jdbc:oracle:thin:<oracle_instance_hostname>:<oracle_listener_port>@<oracle_service_name></connection-url>
  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  <user-name><repository_user_name></user-name>
  <password><repository_user_password></password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
  <metadata>
   <type-mapping>Oracle9i</type-mapping>
  </metadata>
 </no-tx-datasource>
</datasources>

Important: Do not change the jndi-name of the SEMARCHY_REPOSITORY datasource. The application refers to a datasource with this name for the repository.

To configure a data location datasource:

  1. Create in <jboss_home>/server/configuration/deploy/ an XML file named after the data location, and based on the template given below. Make sure to modify the jndi-name, connection-url, user-name and password elements to match your data location schema connection information:
<datasources>
 <no-tx-datasource>
  <jndi-name>jdbc/<data_location_datasource_name></jndi-name>
  <connection-url>jdbc:oracle:thin:<oracle_instance_hostname>:<oracle_listener_port>@<oracle_service_name></connection-url>
  <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
  <user-name><data_location_user_name></user-name>
  <password><data_location_user_password></password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
  <metadata>
   <type-mapping>Oracle9i</type-mapping>
  </metadata>
 </no-tx-datasource>
</datasources>

Repeat this operation for each data location’s datasource.

The repository and data location datasources are now configured, pointing to the schemas previously created.

Setting up the Datasources for JBoss 7

To configure the repository datasource:

  1. Connect to the JBoss Console.
  2. In the Profile section, select Connector > Datasources.
  3. Configure a datasource with the following parameters:
  4. Save this configuration and make sure it is enabled.

To configure a data location datasource:

  1. Connect to the JBoss Console.
  2. In the Profile section, select Connector > Datasources.
  3. Configure a datasource with the following parameters:
  4. Save this configuration and make sure it is enabled.
  5. Repeat this operation for each data location’s datasource.

The repository and data location datasources are now configured, pointing to the schemas previously created.

Deploying the Application

To deploy the application for JBoss 5 and 6:

  1. Uncompress the semarchy_war_only.zip file in the temp/ folder.
  2. Copy the temp/semarchy.war file in the <jboss_home>/server/configuration/deploy/ folder.

To deploy the application for JBoss 7:

  1. Uncompress the semarchy_war_only.zip file in the temp/ folder.
  2. Copy the temp/semarchy.war file in the <jboss_home>/standalone/deployments/ folder.

The Semarchy application is deployed in the server.

Configuring JavaMail Session

This configuration is required for mail notifications using JEE Mail Session.

To configure JavaMail Session for JBoss 5 and 6:

  1. Edit the <jboss_home>/server/<configuration>/deploy/mail-service.xml and alter the default service configuration for your network. See http://community.jboss.org/wiki/JavaMail for more information.

Testing the Application

To test the application:

  1. Open a web browser.
  2. In the URL, enter: http:/<jboss_host>:<jboss_port>/semarchy/.

Tip: Proceed directly to the Installing the Repository task.