Thread management in a Web application is forbidden in some circumstances and is always highly error prone.
For EJB, use framework approaches for parallel execution, instead of using threads.
Our security experts can help you identify and remediate CWE-383 vulnerabilities in your codebase.
Get Security Assessment