Are java app servers able to destroy threads? If yes, how?

前端 未结 2 1587
暗喜
暗喜 2020-12-18 03:54

Destroying threads is deprecated in Java (and not implemented according to javadoc), and interrupting it is only a suggestion which upon the thread is expected to quit, but

2条回答
  •  我在风中等你
    2020-12-18 04:32

    You're not allowed to create a thread of your own inside an ejb server.

    It's not that uncommon to spawn threads in a web container(such as e.g. tomcat) , though you should really think carefully about doing that - and be sure to manage the lifecycle of those threads.

提交回复
热议问题