onAlarm-equipped scopes clean up timer activity after completion which is vital to long-running iterating processes.
parent
183d50ed81
commit
a08d71d845
|
@ -1165,6 +1165,7 @@ public class BPELProcessManagerImpl implements BPELProcessManager {
|
|||
mAllInstances.remove(bp);
|
||||
mAllInstanceIds.remove(bp.getId());
|
||||
BPELHelper.removeUID(bp.getId());
|
||||
mReadyToRunQueue.cleanUp(bp.getId());
|
||||
}
|
||||
|
||||
public void pickMgrCleanUp(ICallFrame callframe) {
|
||||
|
|
|
@ -35,6 +35,7 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
|
||||
import com.sun.jbi.engine.bpel.core.bpel.engine.BPELProcessManager;
|
||||
import com.sun.jbi.engine.bpel.core.bpel.engine.BusinessProcessInstanceThread;
|
||||
|
@ -412,4 +413,19 @@ public class ReadyToRunQueue {
|
|||
public Set<BusinessProcessInstanceThread> getWaitingBPIsSet() {
|
||||
return mWaitingBPIsSet;
|
||||
}
|
||||
|
||||
public void cleanUp(final String bpId) {
|
||||
ReentrantLock lock = new ReentrantLock();
|
||||
lock.lock();
|
||||
try {
|
||||
for (Iterator<BusinessProcessInstanceThread> i = mWaitingBPIsSet.iterator(); i.hasNext();) {
|
||||
final BusinessProcessInstanceThread bpit = i.next();
|
||||
if (bpId.equals(bpit.getProcessInstanceId())) {
|
||||
i.remove();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue