Deploying and Configuring with GlassFish

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

In this section, <glassfish_home> refers to the Glassfish server installation folder.

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

Installing Additional Libraries

Installing the Oracle JDBC Driver

To install the Oracle JDBC driver:

  1. Copy the oracle driver file ( ojdbc6.jar) in the <glassfish_home>/glassfish/lib directory.

Note: After installing the libraries, restart the Glassfish server.

Configuring the Security

Warning: The configuration in this section uses the default File Realm and may be changed to your enterprise’s type of realm.

Configuring the Security Realm and Semarchy Administrator

To configure the security realm:

  1. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Configuration > Server-config > Security > Realms.
  3. Click the New button to create a new realm with the following properties:
  4. Click OK to save the new realm.

To configure the semadmin user:

  1. Click the new SemarchyRealm and then select the Manage Users button.
  2. Click the New button to create a new user with the properties:
  3. Click OK to save the new user.

Configuring Groups/Roles Mappings

The configured realm uses the default Java Authorization Contract for Containers (JACC) provider included in Glassfish. This JACC provider does not support dynamic roles, and mandates that the mappings between Groups and Roles are defined in the deployed application descriptor file.

To define the groups/roles mappings:

  1. Uncompress the semarchy_war_only.zip file in the temp/ folder on the Glassfish server.
  2. Uncompress the semarchy.war file in the temp/semarchy_war_only/ folder.
  3. Edit the temp/semarchy_war_only/semarchy/WEB-INF/glassfish-web.xml file.
  4. Add the section given below in <glassfish-web-app> element and then save the file.
<security-role-mapping>
 <role-name>semarchyConnect</role-name>
 <group-name>semarchyConnectGroup</group-name>
</security-role-mapping>
<security-role-mapping>
 <role-name>semarchyAdmin</role-name>
 <group-name>semarchyAdminGroup</group-name>
</security-role-mapping>

Warning: To add new Semarchy roles after the initial setup and map them to Glassfish groups, you must modify this file and redeploy the application.

Setting up the Datasources

To configure the repository datasource:

  1. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Resources > JDBC > JDBC Connection Pools.
  3. Click the New button to create a new connection pool with the following properties:
  4. Click Next. Set the following additional properties:
  5. Click Finish.
  6. Select the new connection pool and click the Ping button to test it.
  7. In the Common Tasks panel, select Resources > JDBC > JDBC Resources.
  8. Click the New button to create a new JDBC resource with the following properties:
  9. Click OK.

Note: In the Pool Settings, it is recommended to tune the Minimum Pool Size and Maximum Pool Size properties according to your needs. Having a pool size between 1 and 8 connections is typically sufficient for testing purposes.

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. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Resources > JDBC > JDBC Connection Pools.
  3. Click the New button to create a new connection pool with the following properties:
  4. Click Next. Set the following additional properties:
  5. Click Finish.
  6. Select the new connection pool and click the Ping button to test it.
  7. In the Common Tasks panel, select Resources > JDBC > JDBC Resources.
  8. Click the New button to create a new JDBC resource with the following properties:
  9. Click OK.

Note: In the Pool Settings, it is recommended to tune the Minimum Pool Size and Maximum Pool Size properties according to your needs. Having a pool size between 1 and 8 connections is typically sufficient for testing purposes.

Repeat this operation for each data location’s datasource.

To optionnally configure the Pulse Metrics Warehouse datasource:

  1. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Resources > JDBC > JDBC Connection Pools.
  3. Click the New button to create a new connection pool with the following properties:
  4. Click Next. Set the following additional properties:
  5. Click Finish.
  6. Select the new connection pool and click the Ping button to test it.
  7. In the Common Tasks panel, select Resources > JDBC > JDBC Resources.
  8. Click the New button to create a new JDBC resource with the following properties:
  9. Click OK.

Note: In the Pool Settings, it is recommended to tune the Minimum Pool Size and Maximum Pool Size properties according to your needs. Having a pool size between 1 and 8 connections is typically sufficient for testing purposes.

Important: Do not change the JNDI Name of the SEMARCHY_PULSE_METRICS datasource. The application refers to a datasource with this name for the Pulse Metrics Warehouse.

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

Configuring JavaMail Session

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

To configure JavaMail Session:

  1. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Resources > JavaMail Sessions.
  3. Click the New button to create a new JavaMail Session with the following properties:
  4. Add the following additional property to enable SMTP authentication:
  5. Click OK.

Deploying the Application

To deploy the application:

  1. Open the Glassfish WebAdmin interface ( http://<glassfish_host>:4848).
  2. In the Common Tasks panel, select Applications.
  3. Click the Deploy... button.
  4. Select Local Packaged File or Directory ..., and then click Browse Folders...
  5. Select the temp/semarchy_war_only/semarchy/ folder in the folder browser and click Choose Folder.
  6. Select Web Application for the Type and make sure the Status is Enabled.
  7. Click OK to deploy the application.

The Semarchy application is deployed in the server.

Testing the Application

To test the application:

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

Tip: Proceed directly to the Installing the Repository task.