Execution properties for managed executors and context service

An application can specify execution properties to provide additional information to a managed executor or context service about the execution of a task or contextual proxy.

Execution properties are specified as key/value pairs in a map of Strings. To supply execution properties to a managed executor, have your Callable or Runnable implement ManagedTask (or use the convenience methods on the ManagedExecutors class) and have the ManagedTask return the map of execution properties. To supply execution properties to a context service, use one of the variants of createContextualProxy that accepts a map of execution properties as the parameter.

The Concurrency Utilities for Java™ EE specification defines some standard execution properties:

ManagedTask.IDENTITY_NAME
A name by which to identify the task.
ManagedTask.LONGRUNNING_HINT
A true or false value that indicates if a task is expected to take a long time. When a managed task specifies the LONGRUNNING_HINT with a true value, WebSphere® Application Server avoids running the task on a pooled thread, avoids the work request queue and work timeout for that task, and does not count the thread against the maximum or minimum number of threads.
ManagedTask.TRANSACTION
Useful primarily for contextual proxies to determine whether any existing transaction remains on the thread of execution when the contextual proxy runs. Values are ManagedTask.SUSPEND or ManagedTask.USE_TRANSACTION_OF_EXECUTION_THREAD.

指出主題類型的圖示 概念主題



時間戳記圖示 前次更新: July 9, 2016 11:21
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=casb_execprops
檔名:casb_execprops.html