【发布时间】:2020-09-29 13:21:35
【问题描述】:
我正在使用 ExecutorService 进行一些测试,以在 Liberty 中执行多线程。从我的测试看来,启动可以使用 JCICS APi 的线程(例如创建新的 TSQ)的唯一方法是使用静态方法
CICSExecutorService.runAsCics(task1)
如果我以另一种方式启动线程,例如:
// in this way, the OSGi should create an instance of CICSExecutorService automatically
ExecutorService cicsExecutor = Executors.newFixedThreadPool(1);
cicsExecutor .submit(task1);
线程无法使用 JCICS APi;特别是我得到这个错误:
java.util.concurrent.ExecutionException: com.ibm.cics.server.CicsRuntimeException: DTCTSQ_READITEM:
No JCICS context is associated with the current thread.
正确吗?谢谢。
【问题讨论】:
标签: java executorservice websphere-liberty cics