Saturday, April 13, 2013

Setting Up MDM Batch Processor in Windows Development Environment

One of my IBM collegue asked me for help in setting up a batch processor in his machine a while ago.
But I have never setup one in my local at that time and was not aware about  such a possility exist.

I was thinking I need to install cygwin or simulator to replicate the unix behaviour in windows.I came across a MDM Workbench blog which was quiet useful in setting it up.

It is quiet simple.
1)Set up/Install the MDMBatch.ear in your WAS along with your MDM.
2)Use the Batch Process client (windows bat) version to call the EJB located in the MDMBatch.ear
3)The EJB will internally invoke the DWLServiceController which is the entry point to the MDM.

The whole process will take less than 20mins , I am ready tos put money on the table :)

Assumption:
You already have MDM working in you machine.Nothing more.

1)Locate the MDMBatch.ear(eg: It may be in C:\MDM\UNPACK directory) - 30 secs
2)Install the EAR in WAS .Use Fast Path (No need for Detailed path) - 2mins
3)Save & Restart your WAS - 5 min
4)Copy the ClientBatchProcessor(Provided along  with the post in ) in  your C drive -10 sec
5)Locate runabtch.bat(under bin) and double check the following - 5 min
      a)set WAS_HOME="C:\IBM\SDP\runtimes\base_v7" - Edit as per your location
      b)set DWL_BATCH_HOME="C:\ClientBatchProcessor"

6)Open Batch.properties ,Edit
ServerConfiguration.provider_url = corbaloc:iiop:localhost:2813(Change the port as you wish)
ServerConfiguration.context_factory = com.ibm.websphere.naming.WsnInitialContextFactory
(Change the above propery if you are using Weblogic,else leave as such)
   
7) Create a Single Line XML - 3 min
              a)Use Notepad++  or any of your favourite editor
              b)If Notepad++(Plugins ->XMLTools->Linierise XML)
Install the XML Tools plugin in NP++ to easily perform Step 7 b.
For now I have provide you one under the bin(addOrgBatch.xml)

8)Keep the XML under bin -  10 sec
9)Execute runbatch.bat .xml  logs - 10 sec

where logs is the log file directory name , I have already kept that under bin for you.
The log folder will have your batchLoadFail.out ,batchLoadSuccess.out.

References:
a)MDM Workbench Blog

b)Information Center
http://pic.dhe.ibm.com/infocenter/mdm/v10r0m0/index.jsp?topic=%2Fcom.ibm.mdmhs.und.plan.doc%2Fc_Batch_Processing_of_Transactions_using_the_Batch_Framework_and_the_Batch_Transaction_Processor.html

c)http://www-01.ibm.com/support/docview.wss?uid=swg21574707


Client Batch Processor.zip
https://docs.google.com/file/d/0B3obvedGI1lvNVVnQmR4a0pTNlk/edit?usp=sharing