Sample application for the parallel job manager

The MailSample application is an example of parallelized work using the parallel job manager (PJM). It is based on the batch data stream (BDS) framework, and is built using the simple POJO model and packaged using the BatchPackager.

Procedure

  1. Create the PJM database. The DDL files for creating the PJM database for all the supported databases are located in the install_root\longRunning directory. For example, CreateMailerTablesDerby.ddl,CreateMailerTablesDB2.ddl,or CreateMailerTablesOracle.ddl Use the database specific instructions to create the PJM database using the DDL files.
  2. Create a XA JDBC provider, choosing XD datasource as the implementation type.
  3. Create the PJM datasources. Create a datasource using the XA JDBC provider and use the JNDI name jdbc/mailing. Create another datasource using the non-XA JDBC provider and use the JNDI name jdbc/mailingnonxa . Make sure the datasources can connect to the database by clicking test connection.
  4. Install the MailerSampler.ear file.
  5. Start the application.
  6. Prepare the xd.spi properties file
    1. Open xd.spi properties in the install_root\profiles\<profilename>\properties. If the properties file does not exist in this location, copy it from the install_root\properties directory and paste it to theinstall_root\profiles\<profilename>\properties directory.
    2. Ensure the following SPI lines are not commented out:
      • spi.parallel.Parameterizer=com.ibm.websphere.samples.spi.MailerParameterizer
      • spi.parallel.logicalTX.Synchronization=com.ibm.websphere.samples.spi.MailerTXSynchronization
      • spi.parallel.status.SubJobAnalyzer=com.ibm.websphere.samples.spi.MailerSubJobAnalyzer
      • spi.parallel.status.SubJobCollector=com.ibm.websphere.samples.spi.MailerSubJobCollector
    3. Save, then close the file. You might have to restart your system for the previous steps to take affect.
  7. Open MailersubJobxJCL.xml and update the value for EXCHANGED_FILENAME to a valid path.

  8. Open MailerTopJobxJCL.xml and update the value for FILENAME to a valid path. Save and exit.
  9. From the job management console, select save the MailerSubJobxJCL.xml to Job Repository as MailerSampleSubJob
  10. From the job management console, select Job Management > Submit a job. Submit MailerTopJobxJCL.xml job.