I'm using openejb and asynchronous EJBs. I have a lot of Futures and would like to know if one on the futures takes too much time (so i can trace it and finally cancel it). The problem is that to know since how long the future si running, I need to know when it starts. The Future interface let me know if a Future is finished or cancelled, but if it's not, I can't know if it's running or waiting for a thread in the pool. Is it possible to get the Future status (Running/Not started)?
Thanks
Futureallows this. You could always have the task add itself to a collection, then check the collection to see which tasks are running. - DioxinFutureinterface to add the flag to each future. But this would require you to mess around with whichever executor you are currently using, in order to have the executor pass you an instance of yourFutureimplementation containing the flag - DioxinFutureobjects are being used? I'll attempt write an answer that fits your needs - Dioxin