This content has been marked as final. Show 1 reply
There is currently no way of configuring the ThreadFactory used for the LocalExecutorDispatcher.
I am assuming you want this to be configured through the ProcessingPattern xml configuration, right? I have filed an issue to track this internally - INC-627.
To workaround this, currently you will have to roll your own Dispatcher (perhaps by copying the LocalExecutorDispatcher and do your changes in a new class). Note that you don't have to extend the ProcessingPatternNameSpaceHandler to instantiate your new Dispatcher, instead you can use the <instance:class> to instantiate your own custom Dispatcher, including passing in your preferred ThreadFactory. More info on instance namespace here: http://coherence.oracle.com/display/INCUBATOR/The+Instance+Namespace+%281.6.0%29
Here is an example:
<processing:logging-dispatcher displayname="Logging Dispatcher" />
<processing:task-dispatcher displayname="Task Dispatcher">
<processing:local-executor-dispatcher displayname="Local Dispatcher" />
<instance:class classname="com.mycode.MySpecialThreadFactory"/> <!--- Pass in my ThreadFactory as the first constructor parameter -->
<value:string>My dispatcher</value:string> <!--- Pass in the name of the dispatcher as the second constructor parameter -->
<value:integer>10</value:integer> <!--- Pass in the number of threads as the third constructor parameter -->