Thanks to Vernon for this post. Hopefully it should help if you need to load large amounts of test data in a development environment, however any feedback would be useful so please leave a comment to let us know how you get on. Also, the following instructions were written for MDM Workbench 8.5 and WebSphere Application Server 6.1, so some changes may be required for more recent versions.
These instructions assume you already have a working development and test environment:
- MDM test environment set-up by running DEST in the normal way
- MDM AIX files unpacked into directory C:\UNPACK
Extract the artifacts from the distribution material
The Batch processor consists of a server side EAR file and a set of batch processor client artifacts. The EAR file and client material can be found in the unpack directory created by DEST, e.g. C:\UNPACK\MDM\installableApps and C:\UNPACK\MDM\BatchProcessor respectively, as shown below.
Set-up the Server
Install the MDMBatch.ear file for the batch processor on the Application Server, using the WAS Application installer. Using default values seem to work pretty well. Once the EAR has been installed bounce the server to make it available.
Set-up the client
- Copy the batch client directory from the unpacked distribution material to a new directory
- Switch to the directory C:\UNPACK\MDM and enter the following xcopy command, which will create a new working directory \ClientBatchProcessor:
xcopy batchprocessor\* \ClientBatchProcessor /s
- Switch to the .properties directory C:\ClientBatchProcessor\properties and review all the files
- The Batch.properties and Log4J.properties files must be updated, as described below
- Open file Batch.properties in an editor, and update the following lines:
- Locate the line defining the "ServerConfiguration.provider_url" and change the <PROVIDER_URL> to the URL for your server. The line should look something like this (make sure you use the right port number for your server):
ServerConfiguration.provider_url = corbaloc:iiop:localhost:2809
- Locate the line defining the "ServerConfiguration.context_factory" and change the <CTX_FACTORY> to the setting for your server. The line should look something like this:
ServerConfiguration.context_factory = com.ibm.websphere.naming.WsnInitialContextFactory
- Open file Log4J.properties in an editor, and update the following lines:
- Locate the line "log4j.appender.file.File=<INSTANCE_PATH>" and change it to identify the location for any log files. I suggest something like this, which will store the files in a directory named "logs":
To complete the client set-up, you need to configure a script to launch the batch loader. This is described in the next section.
Configure runbatch.bat file
Download runbatch.bat and save it in the \ClientBatchProcessor\bin directory. This is a customised .bat file for invoking the batch loader on Windows. It has two settings which you need to customise for your system:
The location of your WebSphere server runtime, for example C:\Program Files\IBM\SDP\runtimes\base_v61
The location of the batch processor client you configured above, for example C:\ClientBatchProcessor
You can either edit the runbatch.bat file to change the default settings, or you can use environment variables to specify the correct locations, for example:
Run the batch loader
- Start the Application Server, and ensure the MDMBatch application is active
- Switch to the client bin directory
- Invoke the runbatch.bat script. For example, using the following command, where TestPerson.xml is the source file containing the XML documents, and logs is the log directory (see note below):
runbatch TestPerson.xml logs
- When the command completes switch to the log directory to see the results
Details of the parameters are provided in the MDM Developers guide, but two parameters are mandatory. The first option defines the input file containing the XML documents, and the second option defines the directory for the log files.
Note: the log directory must exist. I suggest creating a "logs" directory in the bin directory.