-
Type:
Enhancement
-
Status: Resolved
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 4.3.1-fuse-00-00
-
Fix Version/s: 4.4.0-fuse-00-27
-
Component/s: None
-
Labels:None
-
External Issue URL:
4.3.1-fuse-01-09
Currently different names are used for properties and different in mbean display (and both differs from what is on the thread pool executor)
org.apache.servicemix.nmr.osgi.ExecutorConfigurator has allowCoreThreadsTimeout (with 's' and small 'o') and this is the name of the property that should be used in config file for it to work (ExecutorConfig in smx-utils has allowCoreThreadsTimeout too).
Then ExecutorFactoryImpl uses it to populate allowCoreThreadTimeOut property of thread pool executor (no 's', big 'O')
if (config.isAllowCoreThreadsTimeout()) {
|
try {
|
Method mth = service.getClass().getMethod("allowCoreThreadTimeOut", new Class[]{boolean.class});
|
mth.invoke(service, new Object[]{Boolean.TRUE});
|
}
|
and then ManagedExecutor exposes this property as allowsCoreThreadTimeOut (no 's', small 'o')
public boolean isAllowCoreThreadTimeout() {
|
if (this.internalExecutor != null) {
|
ThreadPoolExecutor executor = this.internalExecutor.getThreadPoolExecutor();
|
try {
|
Method m = ThreadPoolExecutor.class.getMethod("allowsCoreThreadTimeOut", null);
|
try {
|
return (Boolean) m.invoke(executor, null);
|
} catch (Exception ex) {
|
So three versions of the name of the same property. Probably all should be changed to the one used on ThreadPoolExecutor