Skip to Main Content
IBM Z Software


This portal is to open public enhancement requests against IBM Z Software products. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Categories Runtime
Created by Guest
Created on Oct 22, 2013

Allow JCICS and JDBC calls in an OSGi bundle activator class

We do have the need to call JCICS and JDBC services within the activator class of an OSGi bundle.
It is an essential requirement to have access to JCICS and JDBC during the initialisation of a bundle. Otherwise the software reuse of Java code already running in WAS within CICS will not work.

Idea priority Urgent
  • Guest
    Reply
    |
    Oct 5, 2015

    Due to processing by IBM, this request was reassigned to have the following updated attributes:
    Brand - Servers and Systems Software
    Product family - Transaction Processing
    Product - CICS Transaction Server

    For recording keeping, the previous attributes were:
    Brand - WebSphere
    Product family - Transaction Processing
    Product - CICS Transaction Server

  • Guest
    Reply
    |
    Jul 25, 2014

    Hi Juergen, Beta 8 was around February 2014, the fix was done in April, so its in Beta 10 onwards and its in the GA code.

  • Guest
    Reply
    |
    Jul 25, 2014

    Thank you for your sample. I tried it out with CICS TS 5.2 Beta Code 8 in an Activator class, but it doesn't work, because of a RuntimeException.
    Is that code already implemented in beta drop 8 or is it coming later? You mentioned it's part of the base code in CICS TS 5.2

    It seems, the CICSExecutorService uses Task.getTask() before starting a new task to get the current task-instance, but that doesn't work in an activator-environment.

  • Guest
    Reply
    |
    Jul 24, 2014

    The solution works for JVM server too. The new thread will start under transaction ID "CJSA", and from there JCICS calls can be made. Here's an example of how to use it.

    package com.ibm.cics.executor.test;
    import com.ibm.cics.server.CICSExecutorService;
    import com.ibm.cics.server.TSQ;
    import com.ibm.cics.server.TSQType;

    public class ExecutorTest
    {
    public static void main(String[] args)
    {
    // Inline a Runnable class for convenience in this example
    class CICSJob implements Runnable
    {
    public void run()
    {
    // Do JCICS things in this runnable.

    // Create a temporary storage queue
    TSQ test_tsq = new TSQ();
    test_tsq.setType(TSQType.MAIN);

    // Set the TSQ name
    test_tsq.setName("TSQWRITE");

    // Write to the temporary storage queue
    // Use the CICS region local CCSID so it is readable
    String test_string = "Hello from a CICS Thread created in Java - "+ threadId;
    try
    {
    test_tsq.writeItem(test_string.getBytes(System.getProperty("com.ibm.cics.jvmserver.local.ccsid")));
    }
    catch (Exception e)
    {
    e.printStackTrace();
    }
    }
    }

    // Create and run the new CICSJob on a CICS Thread
    Runnable task = new CICSJob();
    CICSExecutorService.runAsCICS(task);
    }
    }

  • Guest
    Reply
    |
    Jul 23, 2014

    Does that solution also work for JVMServer or only for Liberty?

  • Guest
    Reply
    |
    Jul 22, 2014

    Apar PI15275 on CICS TS 5.1 (and the same change is in the base code for CICS TS 5.2) allows use of the new CICSThreadExecutorService in an Bundle activator to asynchronously launch a CICS enabled (fully transactional and AP domain aware) task to perform CICS or JDBC work. You can 'synchronise' on this new thread from the original if you wish to make it a blocking call. It is appreciate it involves a layer of indirection, and perhaps another 5 lines of code launch the ExecutorService, but it is a solution, whilst providing "JCICS or JDBC on the same thread" solution would be a more complex solution.

  • Guest
    Reply
    |
    Dec 27, 2013

    This is a candidate for a future release.