1 2 Previous Next 17 Replies Latest reply on Jun 4, 2010 4:19 PM by hemantsaxena Go to original post
      • 15. Re: How can you carry conversation in @Asynchronous call
        kapitanpetko

        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 :)


        • 16. Re: How can you carry conversation in @Asynchronous call
          serkan.s.eskici.online.nl

          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?



          1. Exactly, that's why I didn't use @In for this case.

          2. The QuartsTriggerHandler gets initialized during startup of the application. It's configured as a component in your components.xml, so that you can inject and get a reference on it.

          • 17. Re: How can you carry conversation in @Asynchronous call
            hemantsaxena

            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

            1 2 Previous Next