WASdev/sample.batch.joblogevents

Name: sample.batch.joblogevents

Owner: WASdev

Description: An MDB application that demos the job log as an event functionality of the batch product. It uses the job log event messages to create a local job log directory structure with the actual job log files.

Created: 2016-06-10 10:47:50.0

Updated: 2016-06-14 18:32:48.0

Pushed: 2016-06-15 09:37:35.0

Homepage: null

Size: 200

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

sample.batch.joblogevents

This sample makes use of the batch-1.0 and batchManagement-1.0 features of WebSphere Liberty.

It is a MDB application that demos the job log as an event functionality of the batch product. It receives batch job log event messages from all the servers in the Liberty environment that have batch events enabled and produce batch job logs. These messages are used to create one local job log directory structure with the actual batch job log files as opposed to having multiple job log directories across multiple servers.

IMPORTANT: This sample requires that batch job events and job logging are enabled within your liberty environment. For more information on these two topics please see the two links below.

Steps to set up and use this sample app

1.) Download the pre-built WAR file or build the WAR file using the source code and maven

2.) Place the WAR file in the desired server's “dropins” directory

3.) Update the server.xml file for the chosen server to include the following:

  This is used by the MDB application activation spec to filter for topics in the topic tree. -->
Topic id="JobLogEventTopic" jndiName="jms/batch/batchJobTopic">
<properties.wasJms topicName="batch//jobs//execution//jobLogPart//." />
sTopic>

 The MDB application to create job log directories from job log events-->
ActivationSpec id="JobLogEventsDirCreator-1.0/JobLogEventsSubscriber">
<properties.wasJms
    destinationRef="JobLogEventTopic" destinationType="javax.jms.Topic" />
sActivationSpec>

Note: This allows the MDB application to receive all the batch job log event messages, which contain the job log contents.

4.) Either start or restart the updated server.

Now the MDB application will create a directory called “JobLogEvents” under the configured server's main directory. It will contain all of the batch job log parts from all servers that have batch events enabled and produce job log parts.

Example directory structure created:

alt tag

Notice

© Copyright IBM Corporation 2016.

License
nsed under the Apache License, Version 2.0 (the "License");
may not use this file except in compliance with the License.
may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

ss required by applicable law or agreed to in writing, software
ributed under the License is distributed on an "AS IS" BASIS,
OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
the License for the specific language governing permissions and
tations under the License.

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.