1. Write the Restfull interface using the Resteasy framework-note that every client request, Resteasy will create a new instance of the class for request processing (each resource file will be initialized at each request, not a single-instance model
Instead of simply calling the corresponding method in the class, the seat needs to be noted).
2.resteasy when making asynchronous processing requests, note that the thread pool, if declared in a class, is aware that it may be instantiated more than once, so thread-pool variables need to use static variables when threads are scheduled to perform asynchronous operations with threads.
The initialization of the thread pool also requires a single-instance mode operation.
2. It is no longer possible to use thread pooling to create threads that can only be manipulated using static methods. (The thread pool acquisition requires a singleton pattern, and each request initializes the Resteasy resource class)
Resteasy JAVAX Asynchronous considerations