I know that we should not start streams in the servlet, so that streams should be managed by the container. If the container is informed of completion, if there are threads that it does not know about hanging around, it will not be completed. I will take care of this, making him a stream of demon ...
But apart from the situation described above, βfailed to shut downβ, what other reason may not be possible so that the servlet does not start threads. I have seen some mention that if the environment is clustered, this will cause a problem. But no actual passage from what could happen would be bad.
EDIT: This is currently being done in the servlet, and I am having problems convincing the author of this code that this is not a good idea. The argument that you need to understand the complexity is not going to fly ... I am looking for a specific specific case when something bad can happen without intending to
In my situation: the servlet in question starts n threads, and this happens in every vm on the cluster by design. No transaction requirement required
source
share