gpt4 book ai didi

java - TomEE 中的 ManagedScheduledExecutorService

转载 作者:行者123 更新时间:2023-11-28 23:54:55 26 4
gpt4 key购买 nike

我的应用程序使用容器 (TomEE) 提供的 ManagedScheduledExecutorService,通过 @Resource 注释注入(inject)。

这是我自己的实例,还是与在同一容器中运行的其他网络应用共享?

作为正常关闭我的应用程序的一部分,我想对此服务做些什么吗?

最佳答案

规范仅处理职责和行为(例如,参见 JSR-236:EE 并发实用程序 1.0 - 第 3.2 章)

TomEE 正在提供有关托管资源的实现特定配置的文档:TomEE - configuration of managed resources

Is this my own instance, or is it shared with other webapps running in the same container?

文档提供了以下信息:“在 TomEE 中,资源主要是‘单例’...”

As part of a graceful shutdown of my app, do I want to do anything to this service?

服务生命周期由容器管理(参见规范)。

关于java - TomEE 中的 ManagedScheduledExecutorService,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53023301/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com