简体   繁体   English

TomEE中的ManagedScheduledExecutorService

[英]ManagedScheduledExecutorService in TomEE

My application uses a ManagedScheduledExecutorService provided by the container (TomEE), injected via a @Resource annotation. 我的应用程序使用由容器(TomEE)提供的ManagedScheduledExecutorService ,该容器通过@Resource注释注入。

Is this my own instance, or is it shared with other webapps running in the same container? 这是我自己的实例,还是与同一容器中运行的其他Web应用程序共享?

As part of a graceful shutdown of my app, do I want to do anything to this service? 作为正常关闭我的应用程序的一部分,我是否想对此服务做任何事情?

The spec is only dealing with responsibilities and behavior (eg see JSR-236: EE Concurrency Utilities 1.0 - Chapter 3.2) 该规范仅处理职责和行为(例如,请参见JSR-236:EE并发实用工具1.0-第3.2章)

TomEE is provding a documentation regarding implementation specific configuration of managed resources: TomEE - configuration of managed resources TomEE正在提供有关托管资源的实现特定配置的文档: TomEE-托管资源的配置

Is this my own instance, or is it shared with other webapps running in the same container? 这是我自己的实例,还是与同一容器中运行的其他Web应用程序共享?

Documentation provides this info: "In TomEE resources are mainly 'singleton'..." 文档提供了以下信息:“在TomEE中,资源主要是'singleton'...”

As part of a graceful shutdown of my app, do I want to do anything to this service? 作为正常关闭我的应用程序的一部分,我是否想对此服务做任何事情?

The service lifecyle is container managed (see the spec). 服务生命周期由容器管理(请参阅规范)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM