1 Reply Latest reply on Feb 15, 2014 6:37 PM by Eduardo Martins

    Configuring the ManagedExecutorService

    Mylos Kathos Master

      Dear all,

      I'd like to know where to configure the ManagedExecutorService for handling async tasks. Within the standalone.xml configuration file I can only find:

                      <managed-executor-services>

                          <managed-executor-service name="default" jndi-name="java:jboss/ee/concurrency/executor/default" context-service="default" hung-task-threshold="60000" core-threads="5" max-threads="25" keepalive-time="5000"/>

                      </managed-executor-services>

      But this is not the JNDI binding where I'm expecting to find it (@Resource(name = "DefaultManagedExecutorService").

      Thanks

      Mylos

        • 1. Re: Configuring the ManagedExecutorService
          Eduardo Martins Apprentice

          If you don't specify @Resource's lookup attribute then WildFly will always provide you with the default instance, no matter which value you define for the name attribute. Which ManagedExecutorService instance is the default is configured in the same EE subsystem, by specifying the instance's JNDI name:

           

          <default-bindings context-service="java:jboss/ee/concurrency/context/default" datasource="java:jboss/datasources/ExampleDS" jms-connection-factory="java:jboss/DefaultJMSConnectionFactory" managed-executor-service="java:jboss/ee/concurrency/executor/default" managed-scheduled-executor-service="java:jboss/ee/concurrency/scheduler/default" managed-thread-factory="java:jboss/ee/concurrency/factory/default"/>

           

          Yes, it's pointing to the instance you mentioned in your post, that's the default ManagedExecutorService.

           

          I wrote a blog post when JSR 236 support was introduced in WildFly 8.0.0.Beta1, and nothing has changed so far with respect to the configuration:

           

          http://blog-emmartins.rhcloud.com/2013/11/wildfly-8-beta-1-and-jsr-236/