Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5495

Update docs to show new way of setting thread pools for JBoss Web

XMLWordPrintable

    • Documentation (Ref Guide, User Guide, etc.)
    • Medium
    • Not Required

      Docs don't explain the new way to define an JBossWeb Executor (that defines a thread pool) that can be shared between components in JBossWeb as oposed to creating one thread pool per connector as it is the old way.

      You don't configure it in server.xml. You need to add a bean definition for the Executor to jboss-as/server/tmp/deploy/jbossweb.sar/META-INF/jboss-beans.xml. Then set the executor property for the TomcatService bean.

      For example:

      <bean name="WebServer"
      class="org.jboss.web.tomcat.service.deployers.TomcatService">

      <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=WebServer", exposedInterface=org.jboss.web.tomcat.service.deployers.TomcatServiceMBean.class,registerDirectly=true)</annotation>

      <!-- Only needed if the org.jboss.web.tomcat.service.jca.CachedConnectionValve
      is enabled in the tomcat server.xml file.
      -->
      <depends>jboss.jca:service=CachedConnectionManager</depends>

      <!-- Transaction manager for unfinished transaction checking in the CachedConnectionValve -->
      <depends>jboss:service=TransactionManager</depends>

      <!-- Inject the TomcatDeployer -->
      <property name="tomcatDeployer"><inject bean="WarDeployer"/></property>
      <!-- Set the securityManagerService used to flush the auth cache on session expiration -->
      <property name="securityManagerService">
      <inject bean="jboss.security:service=JaasSecurityManager" />
      </property>
      <!--
      Do not configure other JMX attributes via this file.
      Use the WarDeployer bean in deployers/jboss-web.deployer/war-deployers-beans.xml
      -->
      <property name="executor"><inject bean="Executor"/></property>
      </bean>

      <bean name="Executor"
      class="org.apache.catalina.core.StandardThreadExecutor">
      <property name="maxThreads">300</property>
      <property name="minSpareThreads">25</property>
      </bean>

      You can the set whatever properties you want for the bean that you would have set in server.xml (the old way).

            ekopalov_jira Eva Kopalova (Inactive)
            rhn-support-sappleton Shaun Appleton
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: