This content has been marked as final.
Show 1 reply
-
1. Re: How to use BasicThreadPool
mallalli Jan 4, 2011 9:18 AM (in response to mallalli)finally i found it
MBeanServer mBeanServer = MBeanServerLocator.locate();
BasicThreadPoolMBean basicThreadPoolBean = (BasicThreadPoolMBean) MBeanProxyExt.create(BasicThreadPoolMBean.class, "jboss.system:service=ThreadPool", mBeanServer);
threadPool = basicThreadPoolBean.getInstance();threadPool.run("your runnable task");
By this way you don have to do thread management and jboss will take care of.
PS:Its always better to have your own threadpool mbean rather than submitting jbos to jboss system thread pool "jboss.system:service=ThreadPool"