Hi Lahiru, I would go for option 1 (Concurrent Framework) as it gives much more control to the programmer e.g. 1. Thread pooling, how many threads can be active etc, 2. Better blocking mechanism than Trhead.join(), which blocks the caller thread. We can make things totally asynchronous by creating another Callable when all the parallel jobs are finished.
Cheers, Ruwan On Thu, Sep 24, 2015 at 10:35 AM, Lahiru Manohara <[email protected]> wrote: > Hi All, > > The BPS we can define to call a methods simultaneously within the workflow. > [image: Inline image 1] > > Same thing can be done using the java threads. There are two > implementation available to tackle this problem. > 1). Using java Executor interface[1] > 2). Using runnable interface[2] > > [1] > http://stackoverflow.com/questions/18162863/how-to-run-different-methods-parallely > [2] > http://stackoverflow.com/questions/9664036/how-to-run-two-methods-simultaneously > > Which option is better. WDYT. > > Thanks. > > -- > Best regards, > > *Lahiru Manohara* > *Software Engineer* > Mobile: +94716561576 > WSO2 Inc. | http://wso2.com > lean.enterprise.middleware > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Ruwan Abeykoon* *Architect,* *WSO2, Inc. http://wso2.com <http://wso2.com/> * *lean.enterprise.middleware.* email: [email protected]
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
