java - Use of WorkManagr API in J2EE application is viable? -
J2EEE specification says that it is not appropriate to create or create user-defined thread in application logic. As a reason, I think the resource dispute is to avoid issues of sync and memory leaks.
But it also suggests using the ManagedExecutorService or the WorkManager API implementation, both of these implementations also have threads produced under the thread.
How is it appropriate to use these APIs and not use threads? First, the Workmanager API is available only for this, so in this way I will address mostly Managed Exposure Service, But whatever I say applies to the work manager too.
The difference between using the Managed Accelerator Service / Workmanager and creating your own thread is that the application manages the built-in threads. This means that the threads you used with this API, and generally javax.enterprise.concurrent * Through the classes, whether in the case of asynchronous work, or explicitly with one, the application provided by the application provides a fixed stability, specific transaction management, security, resource management etc. .
Comments
Post a Comment