JBPM5.4 每启动一个流程增加2个线程

langshawuji 2014-09-02

我现在在用jbpm5.4,启动新流程用如下代码:

    HornetQHTWorkItemHandler hornetQHTWorkItemHandler = new  HornetQHTWorkItemHandler(ksession);

    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", hornetQHTWorkItemHandler);

    pi = ksession.startProcess(processName, params);

 

问题是,每启动一个流程会产生2个线程,导致运行一段时间后,线程数会达到另系统崩溃的程度,请教各位大神帮忙解答下原因,以及如何解决这个问题。

线程信息如下:

    Thread: Old I/O client worker (channelId: 1825802428, /127.0.0.1:34969 => /127.0.0.1:5153) : priority:5, demon:true, threadId:3064, threadState:RUNNABLE, lockName:null

    Thread: Old I/O server worker (parentId: 1476556600, channelId: 554098833, null => localhost/127.0.0.1:5153) : priority:5, demon:false, threadId:8052, threadState:RUNNABLE, lockName:null

Global site tag (gtag.js) - Google Analytics