开发者

User thread spawning in Jetty

I have a web application running over Jetty, and I need to spawn a thread for idle connection handling. This thread is being started in the spring开发者_开发知识库 context.

I know it's not a good practice to spawn threads in a container, but couldn't find a better way to do this. Any ideas?


You can have the container set up a timer or thread pool for you. See the docs.


The traditional way to handle such resources is in a servlet context listener. Check the Servlet API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜