use of org.jpos.util.NameRegistrar.NotFoundException in project jPOS by jpos.
the class QThreadPoolExecutor method getThreadPoolExecutor.
/**
* Retrieves a thread pool executor from NameRegistrar given its name
*
* @param name
* @throws NotFoundException
*/
public static ThreadPoolExecutor getThreadPoolExecutor(java.lang.String name) throws NotFoundException {
ThreadPoolExecutor res = null;
Object object = NameRegistrar.get(THREAD_POOL_EXECUTOR__QBEAN_PREFIX + name);
if (object instanceof ThreadPoolExecutor) {
res = (ThreadPoolExecutor) object;
} else {
throw new NotFoundException(name);
}
return res;
}
use of org.jpos.util.NameRegistrar.NotFoundException in project jPOS by jpos.
the class ISORequestListenerAdaptor method setConfiguration.
public void setConfiguration(Configuration cfg) throws ConfigurationException {
this.cfg = cfg;
try {
mux = (SpaceMUX) NameRegistrar.get(cfg.get("mux"));
} catch (NotFoundException e) {
throw new ConfigurationException(e);
}
timeout = cfg.getLong("timeout", 120000);
pool = new ThreadPool(1, cfg.getInt("pool", 100));
}
Aggregations