Skip Headers
Oracle® Healthcare Master Person Index User's Guide
Release 4.0

E68430-01
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

4 Database Connection Pools, Data Resources, Deleting Tables, and Configuring JMS

This chapter provides procedures on how to define database connection pools and data resources, which each master person index application requires, and deleting database tables that are no longer needed.

This chapter includes the following sections:

Defining the Database Connection Pools and Data Resources

Each master person index application requires two database connection pools; one for the master controller and one for the sequence manager. To set up the connection pools, you need to create the connection pools and then define a JDBC resource for each. This section provides general instructions for setting up the connection pools. For more information about the procedures in this section, see the online help provided with your server's Admin Console.

Note:

In the past if you used an Oracle database, you needed to manually install or copy the database driver to your application server environment. This is no longer the case as the drivers are now included with the OHMPI installation.

To Create JDBC Connection Pools and Data Resources

The JDBC connection pools provide connections to the master person index database. You need to create two connection pools that are configured in the same way.

A JDBC resource (also known as a data source) gives the master person index application the ability to connect to the database. Two JDBC resources are required.

Before proceeding, make sure you have the relevant information about the master person index database (such as the database name, URL, and administrator login credentials).

Define database connectivity through the application server. See Creating JDBC Connection Pools and Setting Data Resources.

Creating JDBC Connection Pools and Setting Data Resources

To Create JDBC Connection Pools and Data Resources for an MPI Application Project for Oracle

  1. Start and stop the Oracle WebLogic Server. For instructions, see Oracle Fusion Middleware Online Documentation 12c Release 1 (12.1.3).

  2. Launch the Oracle WebLogic Server Administration Console.

  3. Log in using the default user name (weblogic) and password (welcome1).

    The Oracle WebLogic Administration Console appears.

  4. On the left panel, under Domain Structure, expand Services, click JDBC, and then select Data Sources.

    A Summary of JDBC Data Sources appears in the right panel.

  5. To create a new JDBC Data Source click New at the bottom of the right panel.

    Settings for a new JDBC Data Source appears in the right panel of the page. It is here that you will create a new JDBC Data Source.

  6. In the Name field, type object_nameDataSource.

    The name you enter here will propagate elsewhere, and it must be the object name that you have already created (for example, PersonDataSource).

  7. In the JNDI Name field, type jdbc/object_nameDataSource.

    Use the name you entered in step 6 here (for example, jdbc/PersonDataSource).

  8. Click Save.

    A new page appears in the right panel which is for setting the Database Type.

  9. In the Database Type drop-down list, select the appropriate type (for example, Oracle).

  10. In the Database Driver drop-down list, select the appropriate driver. For example, Oracle's Driver (Thin XA) for Instance Connections; Versions: 9.0.1; 9.2.0; 10, 11.

  11. Click Next.

  12. Click Next.

    Connection Properties appears on the Create a New JDBC Data Source panel. Use it to define the connection properties.

  13. In the Database Name field, type a name for the database to which you want to connect (for example: Person).

  14. In the Host Name field, type the name or the IP address of the database server (for example: localhost).

  15. In the Port field, type the port on the database server that is used to connect to the database (for example: 1521, the default for Oracle).

  16. In the Database User Name field, type the database account user name you want to use to create database connections (for example: root).

  17. In the Password field, type a password for your database account to use to create database connections.

  18. In the Confirm Password field, re-type the password to confirm it.

  19. Click Next.

    The Settings for object_nameDataSource page appears in the right panel.

  20. Click the Connection Pool tab, click Test Configuration, and then click Next.

    Select Targets appears on the Create a New JDBC Data Source page in the right panel. Here you select one or more targets to deploy the new JDBC data source.

  21. In the Servers check list, select one or more target servers and click Finish.

    Note:

    If you do not select a target, the data source will be created but not deployed. You will need to deploy the data source at a later time.
  22. Repeat the above steps to create jdbc/object_nameSequenceDataSource.

You are now ready to deploy your application.

Creating JMS Resources for an MPI Application Project

The OHMPI delivers the outbound notification events to an OHMPI application-specific JMS topic on any update of the operations for the enterprise objects. You can subscribe the OHMPI application specific JMS topic to receive the outbound notification events for processing.

The following are the types of JMS subscribers:

  • Non-durable Subscriber: A non-durable subscriber receives only events that are subscribed while it is active.

  • Durable Subscriber: For a durable subscriber, the subscribed events are retained in the JMS provider even if the durable subscriber is inactive until the events are received after the durable subscriber is active or the events expire. Therefore, the events can be accumulated in the unexpected growth while the durable subscriber is inactive.

You must choose a durable subscriber or a non-durable subscriber based on the business use cases and handle it reasonably. This section describes how to configure the JMS resources for the MPI application.

JMS servers act as management containers for the queues and topics in the JMS modules that are targeted to them.

The following procedure includes instructions for creating JMS resources, which includes a:

  • JMS Server

  • JMS Module

  • JMS Connection Factory in the specific JMS Module

  • JMS Topic in the specific JMS Module

To Create JMS Server

  1. On the left panel, under Domain Structure, expand Services, click Messaging, and then select JMS Servers.

    A Summary of JMS Servers appears in the right panel. It includes a table that summarizes the JMS servers that have been created in the current WebLogic Server domain.

  2. In the table of previously created JMS Servers, click New.

    The Create a New JMS Server panel appears.

  3. In the Name field, type the name for your new JMS Server.

    Note:

    This name already exists in the table of previously created JMS Servers (in the example, PersonJMSServer).
  4. Click Next.

    Select targets appears in the right panel under Create a New JMS Server.

  5. From the Target drop-down list select a target server instance or migratable target on which you want to deploy the JMS Server.

    If you are deploying on a Clustered environment, select the appropriate target server with the cluster environment.

    Note:

    The default server instance is exampleServer.
  6. Click Finish.

To Create JMS Module

  1. On the left panel, under Domain Structure, expand Services, click Messaging, and then select JMS Modules.

    The JMS Modules panel appears.

  2. In the JMS Modules table, click New to add a new JMS Module.

    The Create JMS System Module panel appears.

  3. In the Name field, type the new JMS Module name (for example, mpi_applicationNameJMSModule).

    Note:

    Again, remain consistent to the name chosen for the JDBC Data Source and the JMS Server (in the previous examples the key word was "Person," making this name PersonJMSModule).
  4. Click Next.

    Targets appears in the right panel under Create a New JMS System Module.

  5. In the Servers area, select the server or cluster on which you want to deploy this JMS system module.

    If you are deploying on a Clustered environment, select the appropriate target server with the cluster environment.

    Note:

    Retain the default, examplesServer.
  6. Click Finish.

To Create JMS Connection Factory

  1. On the left panel, under Domain Structure, expand Services, click Messaging, and then select JMS Modules.

  2. Select the JMS Module (in the example, PersonJMSModule) from the table of JMS Modules.

    The Settings for PersonJMSModule page appears in the right panel.

  3. In the Summary of Resources table, click New.

  4. Under the Type column in the Summary of Resources table, select Connection Factory, and click Next.

    Another panel of Create a New JMS System Module Resource appears.

  5. In the Name field, type PersonOutBoundSender.

  6. In the JNDI Name field, type jms/mpi_application_nameOutBoundSender.

  7. Make sure that the XA Connection Factory Enabled check box is selected.

  8. Click Next

  9. In the Target field, retain the default server instance, which is exampleServer, and click Finish.

    If you are deploying on a Clustered environment, select the appropriate target server with the cluster environment.

To Create JMS Topic

  1. On the left panel, under Domain Structure, expand Services, click Messaging, and then select JMS Modules.

  2. In the right panel, select the JMS Module you created (in the example, PersonJMSModule) from the table of JMS Modules.

    Settings for PersonJMSModule appears in the right panel with a Summary of Resources table.

  3. In the Summary of Resources table, click New, select Topic, and then click Next.

    The Create a New JMS System Module Resource panel appears on the right side of the window. Use this panel to set the properties that identify the new topic.

  4. In the Name field, under JMS Destination Properties, type mpi_application_nameTopic (for example, PersonTopic).

  5. Set jms/PersonTopic as the JNDI Name and click Next.

    The Create a New JMS System Module Resource page appears in the right panel. Use this page to set the properties that will be used to target your new JMS system module resource.

  6. In the Subdeployments drop-down list, select the topic name you just created (for example, PersonTopic) and click Create a New Subdeployment.

  7. In the Subdeployment Name field, type mpi_application_nameTopic (for example, PersonTopic), and click OK.

  8. In the Targets table of JMS Servers, select mpi_application_nameJMSServer (for example, PersonJMSServer).

    If you are deploying on a Clustered environment, select the appropriate target server with the cluster environment.

  9. Click Finish.

Configuring JMS Resource

You can configure the JMS Resource, <APP-NAME>OutBoundSender, on the server deploying the EJB component. Configuring the JMS resource is optional.

Dropping Oracle Healthcare Master Person Index Database Tables

Scripts are provided to drop the default database tables and indexes created in Step 8: Create the Master Person Index Database Structure. This is useful while testing the master index application implementation.

To Delete Database Tables

  1. Open a standard SQL editor and connect to the master person index database using the user you created in Step 2: Create a Master Person Index Database and User.

  2. Open drop.sql in the NetBeans editor.

  3. Copy and paste the entire text of drop.sql into the SQL editor.

  4. Run the script against the database.

  5. If the database is running on the Oracle 10g platform, open a SQL prompt and run the following command.

    PURGE RECYCLEBIN;