简体   繁体   English

Java EE 7-ManagedThreadFactory可能的限制

[英]Java EE 7 - ManagedThreadFactory possible limitations

Java EE 7 offers some good multithreading tools with package javax.enterprise.concurrent . Java EE 7提供了一些很好的带有包javax.enterprise.concurrent多线程工具。 Is there any limitations when using the thread of ManagedThreadFactory ? 使用ManagedThreadFactory线程时是否有任何限制? Can I just run this thread for infinite or will the server try to clean this up after x period of time? 我可以无限期地运行此线程,还是服务器会在x个时间段后尝试清理该线程?

I can't find much about this. 我找不到太多有关此的信息。

I have taken a look into JSR-236: https://jcp.org/en/jsr/detail?id=236 and looking into it, it seems running long processes are allowed. 我研究了JSR-236: https : //jcp.org/en/jsr/detail? id=236并对其进行了研究,看来允许运行长进程。 In the document at 3.4.1.1.3 they show an example of using a Thread which runs in a while loop. 在3.4.1.1.3的文档中,它们显示了使用在while循环中运行的Thread的示例。 Also 3.4.4.2.3 describes about priorities which can be used for long-running processes. 此外3.4.4.2.3介绍了有关用于长期运行的进程的优先级。

To answer my own question, according to JSR-236 it is allowed to used it for long running processes. 为了回答我自己的问题,根据JSR-236,允许将其用于长时间运行的进程。

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

相关问题 Glassfish中的Java EE WebSockets可能“僵尸”连接 - Java EE WebSockets in Glassfish possible “zombie” connection Java EE / Jakarta EE 是否支持 Java 模块系统? 是否可以使用 Java 模块系统制作 web 应用程序? - Does Java EE / Jakarta EE support the Java module system? Is it possible to make web application with the Java module system? 可以在Java EE中创建多用户/共享会话/实例吗? - Possible to create a multi-user/shared session/instance in Java EE? 是否可以使用Java EE注入实现接口的bean列表 - Is it possible to inject a list of beans implementing an interface using Java EE Bean初始化失败; 嵌套的异常是java.lang.NoClassDefFoundError:Ljavax / enterprise / concurrent / ManagedThreadFactory - Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Ljavax/enterprise/concurrent/ManagedThreadFactory 是否可以检索部署Java EE应用程序的端口 - Is it possible to retrieve the port where a Java EE application is deployed 如何在Java EE应用程序中尽早初始化Log4J? - How to initialize Log4J as early as possible in an Java EE application? Java 扫描程序限制 - Java Scanner Limitations Java Hotswap的局限性 - Limitations with Java Hotswap java keystore文件限制 - java keystore file limitations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM