Saturday, June 23, 2012

Ignore Stuck Threads for JCA FileAdapter

The default threading model for FileAdapter created long running threads who poll the file system. After 600 seconds they generate Health warning and error stacktraces. To get rid of this, without losing in general the capability to detect Stuck Threads in other parts of the Server, use a WorkManager and associate it to each Proxy Service using a FileAdapter.

WLST Snippet to create WorkManager :

DOMAIN_NAME=osbpl1do
CLUSTER_NAME=osbpl1cl

edit()
startEdit()
cd('/SelfTuning/' + DOMAIN_NAME)
cmo.createWorkManager('WorkManagerIgnoreStuckThreads')
cd('/SelfTuning/' + DOMAIN_NAME + '/WorkManagers/WorkManagerIgnoreStuckThreads')
set('Targets',jarray.array([ObjectName('com.bea:Name=' + CLUSTER_NAME + ',Type=Cluster')], ObjectName))
cmo.setIgnoreStuckThreads(true)

activate()



For each of the FileAdapter JCA Proxy Services, edit the JCA Properties and assign 'WorkManagerIgnoreStuckThreads' to the Dispatch Policy.


See also the official Oracle doc on this topic (search for ignore-stuck-threads)

No comments: