I have been involved in a few Stratos code reviews, and one of the major
issues I noted in many places is that Stratos does not have a proper
threading model. Threads are created as and when needed in many places. In
fact, there were instances where threads were spawned from within the run
method of other threads! Then there are instances of while(true) loops
inside the run methods.

All that code has to be reviewed and cleaned up. We need to have proper
thread pools defined. The pool sizes should be configurable, and have to
use the ExecutorService in the relevant places.

IMO, this has to be fixed soon before this bad practice gets adopted in new
code as well.

-- 
*Afkham Azeez*
Director of Architecture; WSO2, Inc.; http://wso2.com,
*Member; Apache Software Foundation; **http://www.apache.org/*
<http://www.apache.org/>

*email: **[email protected]* <[email protected]>
* cell: +94 77 3320919blog: **http://blog.afkham.org*
<http://blog.afkham.org>
*twitter: **http://twitter.com/afkham_azeez*
<http://twitter.com/afkham_azeez>
*linked-in: **http://lk.linkedin.com/in/afkhamazeez
<http://lk.linkedin.com/in/afkhamazeez>*

*Lean . Enterprise . Middleware*

Reply via email to