Dear experts,
I am having some doubts on how useful are contextual proxy objects and
whether they have a place in JSR 236.
Currently, section 3.3 in the specs listed a few usages for contextual
proxy objects:
- Contextual objects allow application components to develop a wide
variety of applications and services that are not normally possible in
the Java EE platform, such as workflow systems. When used in conjunction
with a ManagedThreadFactory, customized Java SE platform ExecutorService
implementations can be used. Concurrency Utilities for Java EE
Callable or Runnable could already be run within an application context
when used with ManagedThreadFactory instances which have context
configuration properties defined. In the example in section 3.3.1, the
tasks agency2 and agency3 could well be plain Callable and still be run
with the application's execution context if the ManagedThreadFactory at
"concurrent/ThreadFactory" in the same example is configured with
Context="concurrent/AllContexts".
- The ContextService also allows non-Java EE service callbacks (such as
JMS MessageListeners and JMX NotificationListeners) to run in the
context of the listener registrant instead of the implementation
provider's undefined thread context. See section 4.4.3 for an example).
Concurrency Utilities for Java EE
Is JSR 236 the proper place where the issue of non-Java EE service
callbacks be handled?
Regards
Anthony