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
- 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.
- Create a XA JDBC provider, choosing XD datasource as the
implementation type.
- 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.
- Install the MailerSampler.ear file.
- Start the application.
- Prepare the xd.spi properties file
- 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.
- 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
- Save, then close the file. You might have to
restart your system for the previous steps to take affect.
- Open MailersubJobxJCL.xml and update the value for EXCHANGED_FILENAME
to a valid path.
- Open MailerTopJobxJCL.xml and update the value for FILENAME
to a valid path. Save and exit.
- From the job management console, select save the MailerSubJobxJCL.xml
to Job Repository as MailerSampleSubJob
- From the job management console, select Job Management
> Submit a job. Submit MailerTopJobxJCL.xml job.