Would the execution of the runnable in JBoss thread pool have any effect on the called thread and its context.

Solution Verified - Updated -

Issue

  • Using a singleton instance of a java class to access a JBoss 5 Thread pool.
 try {
   MBeanServer server = MBeanServerLocator.locateJBoss();
   jbossThreadPool = (ThreadPool) server.getAttribute(new ObjectName("jboss.system:service=TestThreadPool"),
     "Instance");

   jbossThreadPool.run(plRunner);
  } catch (Exception e) {
    ... LOG ...
  }

Example configuration of a thread pool in jboss//conf/jboss-service.xml

   <mbean code="org.jboss.util.threadpool.BasicThreadPool"
      name="jboss.system:service=TestThreadPool">
      <attribute name="Name">TestThreadPool</attribute>
      <attribute name="KeepAliveTime">60000</attribute>
      <attribute name="MaximumPoolSize">100</attribute>
      <attribute name="MaximumQueueSize">1000</attribute>
      <attribute name="BlockingMode">abort</attribute>
   </mbean>
  • Would the execution of the runnable in JBoss thread pool have any effect on the called thread and its context.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content