Why is spawning threads in Java EE container discouraged?

前端 未结 9 1720
清歌不尽
清歌不尽 2020-11-22 04:50

One of the first things I\'ve learned about Java EE development is that I shouldn\'t spawn my own threads inside a Java EE container. But when I come to think about it, I do

9条回答
  •  名媛妹妹
    2020-11-22 05:34

    You can always tell the container to start stuff as part of your deployment descriptors. These can then do whatever maintainance tasks you need to do.

    Follow the rules. You will be glad some day you did :)

提交回复
热议问题