Installing the Java EE database logger for MFT with WebSphere Application Server traditional Version 9.0
Follow these instructions to install and configure the Java Platform, Enterprise Edition (Java EE) database logger for Managed File Transfer with WebSphere Application Server traditional Version 9.0.
Before starting
Before you install the JEE database logger application, follow the instructions in the topics Preparing to install the Java EE database logger for MFT and Set the native library path in WebSphere Application Server traditional Version 9.0.
For more information about the Java EE database logger, see Configure an MFT logger.
Procedure
- Set up the XA JDBC provider:
- Select Resources > JDBC > JDBC Providers from the WebSphere Application Server traditional Version 9.0 administration console navigation.
- Create a JDBC provider using the console wizard, by clicking New.
- At Step 1 of the wizard, select the database that we are using from the Database type list, and the associated provider type from the Provider type list. From the Implementation type list, select XA data source. Click Next. We can remove a reference to db2jcc_license_cisuz.jar and we should change db2jcc.jar to db2jcc4.jar, that is, the version of the jar file shipped with the latest version of Db2, or your local version.
- At Step 2 of the wizard, ensure that the directory location of the required database jar files is set correctly. Click Next.
- Click Finish on the summary page to create the JDBC provider.
- Create authentication aliases. You create one alias for the data source and another for IBM MQ:
- Select Security > Global security from the WebSphere Application Server traditional Version 9.0 administration console navigation.
- Under the Authentication heading, expand Java Authentication and Authorization Service.
- Click J2C authentication data. The authentication alias page opens.
- Create an authentication alias for the data source:
- Click New.
- Enter the details for Alias, User ID, Password, and Description. The details that are entered in the User ID and Password fields must match the details that you entered when you created your database user. For more information, see Configure user access for the Java EE database logger for MFT.
- Click OK.
- Create an authentication alias for IBM MQ:
- Click New.
- Enter the details for Alias, User ID, Password, and Description. The details that are entered in the User ID and Password fields must match your user and password settings for the IBM MQ installation.
- Click OK.
- Create a data source:
- Select Resources > JDBC > Data sources from the WebSphere Application Server traditional Version 9.0 administration console navigation.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- Create a data source using the console wizard, by clicking New.
- At Step 1 of the wizard, in the Data source name field, enter wmqfte-database and in the JNDI name field, enter jdbc/wmqfte-database. Click Next.
- At Step 2 of the wizard, use the Select an existing JDBC provider dropdown list to select the JDBC provider created in the previous steps. Click Next.
- Db2: At Step 3 of the wizard, in the Driver type field, enter 4.
- Db2: Enter the details in the Database name, Server name, and Port number fields, and click Next.
Oracle: Enter the connection URL in the URL field and choose the correct data store helper in the Data store helper class name field.
Oracle RAC: When connecting to an Oracle Real Application Cluster, the connection URL must include the host information necessary to connect to all available instances of the database.
- At Step 4 of the wizard, select the name of the data source authentication alias that you defined in step 2d from the Authentication alias for XA recovery list. Select the same name from the Component-managed authentication alias and Container-managed authentication alias lists.
- Click Finish on the summary page to create the data source.
- Optional: Verify the configuration of the data source:
- Select Resources > JDBC > Data sources from the WebSphere Application Server traditional Version 9.0 administration console navigation.
- Click the Test Connection button.
- Create a topic.
- From the WebSphere Application Server traditional Version 9.0 administration console navigation, click Resources > JMS > Topics.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- Click New.
- Click IBM MQ messaging provider.
- On the Administration panel of the property page for the topic, choose unique values for the Name and JNDI name fields, that we will reference later on in the configuration.
- In the IBM MQ topic panel, enter SYSTEM.FTE/Log/# in the Topic name field.
- Create an activation specification:
- From the WebSphere Application Server traditional Version 9.0 administration console navigation, click Resources > JMS > Activation specifications.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- Click New.
- Click IBM MQ messaging provider.
- In Step 1 of the wizard, choose unique values for the Name and JNDI name fields, that we will again reference later on in the configuration.
- In Step 1.1, enter the JNDI name for the topic that you set up in step 5 in the Destination JNDI name field.
- From the Destination type list, select Topic.
- In Step 1.2 of the wizard, select Durable Subscription. Enter SYSTEM.FTE.DATABASELOGGER.AUTO in the Subscription name field.
- In Step 2 of the wizard, select Enter all the required information into this wizard.
- In Step 2.1, enter your queue manager name in the Queue manager or queue sharing group name field.
- In Step 2.2, select your chosen transport method from the Transport list. If you select Bindings, no other information is required. If you select Client or Bindings then client, enter the details for Hostname, Port, and Server connection channel.
- Optional: Click Test Connection to confirm the queue manager is present. However, we can expect to receive NOT_AUTHORIZED until you have referenced the authentication alias in step 6n.
- Click Save.
- Click the name of the Activation Specification that you created. In the General Properties section of the Configuration tab, scroll down to the Advanced panel and enter a unique name to identify the IBM MQ connection in the Client ID field. We must complete this step or your connection is rejected by IBM MQ with the JMSCC0101 error code.
- If you chose Client as your transport method, scroll down to the Security Settings panel and select the authentication alias that you defined in step 8 from the Authentication alias list.
- Click Apply.
- In the Additional Properties section of the Configuration tab, click Advanced Properties. In the Connection Consumer section of the Advanced Properties panel, enter 1 into the Maximum server sessions field. Note: Ensure you complete this step before proceeding. Failure to do so can cause the logger to fail to operate correctly.
- In the Additional Properties section of the Configuration tab, click Advanced Properties. Set the value of Stop endpoint if message delivery fails to a minimum of 1.
If the value of the _numberOfFailedAttemptsBeforeReject property is set to more than 1 (see 9j for more information), set Stop endpoint if message delivery fails to at least the value of the _numberOfFailedAttemptsBeforeReject property. This prevents the endpoint from stopping when a message that cannot be processed (for example, a malformed transfer log message) is received. For more information, see MFT logger error handling and rejection.
- Create a queue connection factory.
- From the WebSphere Application Server traditional Version 9.0 administration console navigation, click Resources > JMS > Queue connection factories.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- Click New.
- Click IBM MQ messaging provider.
- In Step 1 of the wizard, choose unique values for the Name and JNDI name fields, that we will again reference later on in the configuration.
- In Step 2, select Enter all the required information into this wizard.
- In Step 2.1, enter your queue manager name in the Queue manager or queue sharing group name field.
- In Step 2.2, select your chosen transport method from the Transport list. If you select Bindings, no other information is required. If you select Client or Bindings then client, enter the details for Hostname, Port, and Server connection channel.
- Optional: Click Test Connection to confirm the queue manager is present. However, we can expect to receive NOT_AUTHORIZED until you have referenced the authentication alias in step 7h.
- If you selected Client or Bindings then client as your transport method, click the name of the queue connection factory you have just created. Scroll down to the Security Settings panel of the Configuration tab and select the authentication alias that you defined in step 2e from the Authentication alias for XA recovery and Container-managed authentication alias lists.
- Create a reject queue in WebSphere Application Server:
- From the WebSphere Application Server traditional Version 9.0 administration console navigation, click Resources > JMS > Queues.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- Click New.
- Click IBM MQ messaging provider.
- Choose unique values for the Name and JNDI name fields, that we will again reference later on in the configuration.
- Enter SYSTEM.FTE.LOG.RJCT.logger_name in the Queue name field. Ensure you have created this queue on your coordination queue manager.
- Enter your queue manager name in the Queue manager name field.
- Click OK.
- Install the JEE database logger application:
- From the WebSphere Application Server traditional Version 9.0 administration console, select Applications > New Application.
- Select the Scope drop-down list and change the scope to the appropriate value. For example, Node=yourNode, Server=yourServer.
- From the options list, select New Enterprise Application.
- On the Preparing for the application installation page, select the com.ibm.wmqfte.databaselogger.jee.ear file or the com.ibm.wmqfte.databaselogger.jee.oracle.ear file from the MQ_INSTALLATION_PATH/mqft/web directory of the Managed File Transfer Service installation, and click Next.
- On the following screen, select Detailed to show all installation options and parameters, and click Next.
- Click Next through wizard steps 1-4 to accept the default values.
- In step 5 of the wizard, Bind listeners for message driven beans, scroll to the Listener Bindings section. Click Activation Specification. Enter the required values for the following fields:
- Target Resource JNDI name
- The JNDI name that you specified when creating an activation specification in step 6d.
- Destination JNDI name
- The JNDI name that you specified when creating a topic in step 5d.
Click Next.
- In step 6 of the wizard, Map resource references to resources, enter the details in the Target Resource JNDI name field. This name is the JNDI name that you specified for the reject queue connection factory in step 7c. Click Next.
- In step 7 of the wizard, Map resource environment entry references to resources, enter the details in the Target Resource JNDI name field. This name is the JNDI name of the reject queue that you created in step 8d. Click Next.
- In step 8 of the wizard, Map environment entries for EJB modules, accept the default value of 1. Click Next.
Oracle RAC: When connecting to an Oracle Real Application Cluster we must set the value of the _numberOfFailedAttemptsBeforeReject property to at least 2. This property determines the number of times that the logger attempts to process an audit message after a failure occurs. In a case of database failover at least one failure is likely to occur. To avoid unnecessarily moving a message to the reject queue, increasing this value allows a second attempt to be made, which usually results in success as a connection is made to the new database instance. If we find during testing that messages are still moved to the reject queue during failover of our database instance, increase this value further: the timing of the switch between instances might cause more than one failure for the same message. However, be aware that increasing this value affects all failure cases (for example, a malformed message) and not just database failover, so increase the value with care to avoid unnecessary retries.
- In step 9 of the wizard, Metadata for modules, click Next.
- In step 10 of the wizard, Summary, click Finish.
- We can now start the application from the WebSphere Application Server traditional Version 9.0 administration console:
- Select Applications > Application Types > WebSphere enterprise applications from the console navigation.
- Select the check box for the Logger enterprise application from the collection table, and click Start.
Parent topic: Installing the Java EE database logger for MFT