X

Proactive insights, news and tips from Oracle WebLogic Server Support. Learn Oracle from Oracle.

  • November 25, 2015

Concurrency Utilities support in WebLogic Server 12.2.1

As part of its support for Java EE 7, WebLogic Server 12.2.1 supports the Java EE Concurrency Utilities(JSR236) specification.

This
specification provides a simple, standardized API(4 types of managed
objects) for using concurrency from Java EE application components(such
as servlets and EJBs). The 4 types of concurrent managed objects
implement these interfaces in javax.enterprise.concurrent package:
ManagedExecutorService, ManagedScheduledExecutorService,
ManagedThreadFactory, ContextService.

If you are still using common Java SE concurrency APIs such as java.lang.Thread or java.util.Timer directly
in your servlets or EJBs, you are strongly recommended to use java EE
Concurrency Utilities instead. Threads created by using Java SE concurrency APIs
are not managed by WebLogic Server, so that services and resources
provided by WebLogic Server are typically unable to be reliably use
d from these un-managed threads.  By using java EE Concurrency Utilities, asynchronous tasks run on WebLogic Server-managed threads. Since WebLogic Server has knowledge of these threads/asynchronous tasks, it can manage them by:

  • Providing the proper execution context, including JNDI, ClassLoader, Security, WorkArea
  • Submitting
    short-running tasks to the single server-wide self-tuning thread pool
    to make them prioritized based on defined rules and run-time metrics
  • Limiting the number of threads for long-running tasks to prevent negative affect on server performance and stability
  • Managing the lifecycle of asynchronous tasks by interrupting threads/cancelling tasks when the application shuts down

CommonJ API(providing context aware Work Managers and Timers) is WebLogic Server specific, and is the predecessor of Java EE Concurrency Utilities. Comparing to CommonJ API, Java EE Concurrency Utilities is more standardized and easier to use, and provides more functions like custom scheduling, ContextService, ManagedThreadFactory.

Read these articles for details:

See for more details Configuring Concurrent Managed Objects in the product documentation.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services