I need a thread in Web/JavaEE container to complete AsyncContext objs in same JVM
问题 I need a thread in Web/JavaEE container to fetch information from an external source and complete corresponding AsyncContext objs in same JVM. I wish to have a zero-added-latency solution, so periodic polling or a timer is ruled out. I could start a thread but I believe it is frowned upon in a Web container and not portable. Q1. Is it possible to run a thread portably in a Java EE container instead? Q2. If I want to run a thread in a Web Container anyway, what is the "least of all evil" ways?