Topic
  • 4 replies
  • Latest Post - ‏2012-10-31T20:10:07Z by SystemAdmin
SystemAdmin
SystemAdmin
783 Posts

Pinned topic How to configure JobListener in xJCL for Compute Grid

‏2012-10-29T20:38:57Z |
Hi

I and trying to write an implementation for com.ibm.websphere.batch.listener.JobListener interface. Though I have the implemented class completed, I am not sure how to plugin this JobListener in xJCL for Compute Grid. I couldn't find any sample code or example available for this. If you have an any idea on this interface or its usage, Please let me know.

Thanks in advance.
Updated on 2012-10-31T20:10:07Z at 2012-10-31T20:10:07Z by SystemAdmin
  • sspavan
    sspavan
    60 Posts

    Re: How to configure JobListener in xJCL for Compute Grid

    ‏2012-10-29T23:07:17Z  
    Hi,

    Before your job-step and after substitution properties you need to specify your listener as shown below. If you have any specific properties to be passed to the Listener they can be mentioned in the <props> tag

    <substitution-props>
    <prop name="inputfile" value="c:/input.txt"/>
    <prop name="outfile" value="c:/output.txt"/>
    </substitution-props>
    <listener>
    <classname>com.bcbs.test.JobListenerImpl</classname>
    <props>
    </props>
    </listener>
    <job-step name="TestJob">
  • SystemAdmin
    SystemAdmin
    783 Posts

    Re: How to configure JobListener in xJCL for Compute Grid

    ‏2012-10-30T14:20:22Z  
    • sspavan
    • ‏2012-10-29T23:07:17Z
    Hi,

    Before your job-step and after substitution properties you need to specify your listener as shown below. If you have any specific properties to be passed to the Listener they can be mentioned in the <props> tag

    <substitution-props>
    <prop name="inputfile" value="c:/input.txt"/>
    <prop name="outfile" value="c:/output.txt"/>
    </substitution-props>
    <listener>
    <classname>com.bcbs.test.JobListenerImpl</classname>
    <props>
    </props>
    </listener>
    <job-step name="TestJob">
    Hi Pavan

    Thanks for your response. I tried adding the following in xJCL

    <listener>
    <classname>com.bcbs.test.JobListenerImpl</classname>
    <props>
    </props>
    </listener>

    but in RAD, error is shown for this element as an invalid element, job-step is expected. I am using the folowing namespace. Please let me know if I need to correct namespace

    <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://core.wcg.etools.ibm.com/xsd/xJCL.xsd" name="SampleBatchJob" default-application-name="SampleBatchProjectEAR">
  • sspavan
    sspavan
    60 Posts

    Re: How to configure JobListener in xJCL for Compute Grid

    ‏2012-10-30T15:23:51Z  
    Hi Pavan

    Thanks for your response. I tried adding the following in xJCL

    <listener>
    <classname>com.bcbs.test.JobListenerImpl</classname>
    <props>
    </props>
    </listener>

    but in RAD, error is shown for this element as an invalid element, job-step is expected. I am using the folowing namespace. Please let me know if I need to correct namespace

    <job xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://core.wcg.etools.ibm.com/xsd/xJCL.xsd" name="SampleBatchJob" default-application-name="SampleBatchProjectEAR">
    Hi Sree,

    Yes RSA has bug with schema validation but you should be able to run the job without issues. You need to get fixpack 8.0.4.1 to fix the schema validation issue.

    Alternatively you can copy the xjcl to a different location say to desktop and comment the listener tags in your workspace xjcl. When you trigger the job you have to pick it from desktop.
  • SystemAdmin
    SystemAdmin
    783 Posts

    Re: How to configure JobListener in xJCL for Compute Grid

    ‏2012-10-31T20:10:07Z  
    • sspavan
    • ‏2012-10-30T15:23:51Z
    Hi Sree,

    Yes RSA has bug with schema validation but you should be able to run the job without issues. You need to get fixpack 8.0.4.1 to fix the schema validation issue.

    Alternatively you can copy the xjcl to a different location say to desktop and comment the listener tags in your workspace xjcl. When you trigger the job you have to pick it from desktop.
    Thanks for the solution pavan.

    If it is only a syntax validation issue, I don't think so we need to worry about it. I just want to confirm that if I submit the xJCL with listeners to compute grid, will it be accepted and executed successfully. I will be trying this out myself once, but let me know if this works and any specific versions of WAS and Compute Grid required to run this.