JBoss Community

What is taskOperationHandler.waitTillDone(5000) suppose to do?

created by lyman liu in jBPM - View the full discussion

...

System.out.println("begin");

responseHandler.waitTillDone(5000);

System.out.println("end ");

...

It means:Print "begin", wait 5000ms, print "end",all right?

 

My question is :

How can I  determined the wait time ?

 

if the network is bad, I wait 5000 and then  execute  client.dispose(),

 

it will be throw    exception  that 

java.nio.channels.ClosedSelectorException

at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)

at sun.nio.ch.SelectorImpl.select(Unknown Source)

at org.apache.mina.transport.socket.nio.NioProcessor.select(NioProcessor.java:70)

at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1067)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

 

 

Can  u give me  some solutions about it ?

Regards.

Reply to this message by going to Community

Start a new discussion in jBPM at Community