archis99
archis99

Reputation: 15

Implementing concurrency in Websphere based application

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?

Upvotes: 0

Views: 842

Answers (1)

covener
covener

Reputation: 17872

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

Upvotes: 1

Related Questions