1+ /*
2+ * COPYRIGHT LICENSE: This information contains sample code provided in source
3+ * code form. You may copy, modify, and distribute these sample programs in any
4+ * form without payment to IBM for the purposes of developing, using, marketing
5+ * or distributing application programs conforming to the application programming
6+ * interface for the operating platform for which the sample code is written.
7+ *
8+ * Notwithstanding anything to the contrary, IBM PROVIDES THE SAMPLE SOURCE CODE
9+ * ON AN "AS IS" BASIS AND IBM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING,
10+ * BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY,
11+ * SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND ANY WARRANTY OR
12+ * CONDITION OF NON-INFRINGEMENT. IBM SHALL NOT BE LIABLE FOR ANY DIRECT, INDIRECT,
13+ * INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
14+ * OPERATION OF THE SAMPLE SOURCE CODE. IBM HAS NO OBLIGATION TO PROVIDE
15+ * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS OR MODIFICATIONS TO THE SAMPLE
16+ * SOURCE CODE.
17+ *
18+ * (C) Copyright IBM Corp. 2016.
19+ *
20+ * All Rights Reserved. Licensed Materials - Property of IBM.
21+ */
22+ package com .ibm .cicsdev .batch ;
23+
24+ import javax .batch .api .AbstractBatchlet ;
25+
26+ import com .ibm .cics .server .Task ;
27+
28+ /**
29+ * The batchlet is referenced by simpleBatch.xml and is expected to run in CICS liberty.
30+ */
31+ public class simpleBatchlet extends AbstractBatchlet {
32+ @ Override
33+ public String process () throws Exception {
34+ // Get current task number and output to STDOUT
35+ int myTask = Task .getTask ().getTaskNumber ();
36+ System .out .println ("BATCHLET is working on a CICS enabled thread with task number " + myTask );
37+ return null ;
38+ }
39+ }
0 commit comments