0

We are developing a Java EE Web Application which is deployed on Websphere Web server. Currently, there is a requirement for concurrent execution to speed-up the response time. So among the below choices, which and why will be a better selection?

  1. Using ExecutorService
  2. Using Managed Executor Service (What are the basic usage & implementation difference between these above two methods)
  3. Any other option?

1 Answer 1

1

The javadoc for ManagedExecutorService makes the difference pretty clear:

A ManagedExecutorService extends the Java™ SE ExecutorService to provide methods for submitting tasks for execution in a Java™ EE environment. Implementations of the ManagedExecutorService are provided by a Java™ EE Product Provider. Application Component Providers use the Java Naming and Directory Interface™ (JNDI) to look-up instances of one or more ManagedExecutorService objects using resource environment references. ManagedExecutorService instances can also be injected into application components through the use of the Resource annotation.

You should simply use the spec-defined EE concurrency utilities (including ManagedExecutor).

https://www.ibm.com/support/knowledgecenter/en/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/asyncbns/concepts/casb_concurrency.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.