I'm glad it works for you, but 'somehow' and 'I don't care' just doesn't cut it. We need to understand how and why this works (or doesn't work). That said, enough for today, have fun :)
Nikolay Elenkov wrote on Jun 04, 2010 05:11:
Serkan Eskici wrote on Jun 04, 2010 04:57:
1) I know that you can use @In instead of using Component.getInstance(..) nothing wrong with both. It's just a matter of taste. But if you only make an async. call within 1 method, then prefer Component.getInstance() instead of using @In.
OK, getInstance is actually a bit better for performance since you skip the interceptor, just looks ugly with all the casts...
2) You can inject the timer and return it back, IF you want to pause, stop or resume the thread. It depends on your use case.
Where does it come from the first time?
Thanks for your response Nikolay. And thanks to all who contributed their knowledge on the topic.
Finally I resolved my situation by implementing shared object between the long running conversation and the asynchronous call; and keep checking on the state of the object by polling in the long-running conversation.
Thanks,
Hemant