1 Reply Latest reply on Mar 8, 2018 2:19 PM by jamezp

    how to create a single threaded managed executor service

    jeffgaer

      I added a new managed executor service to the standalone.xml

       

        <managed-executor-services>

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

                          <managed-executor-service name="singleThreaded" jndi-name="java:jboss/ee/concurrency/executor/singleThreaded"

                                    context-service="default" hung-task-threshold="60000" keepalive-time="5000"

                                    core-threads="1" max-threads="1"  />

                      </managed-executor-services>

       

      I inject it using the resource lookup attribute

       

      @Resource (lookup = "jboss/ee/concurrency/executor/singleThreaded")

      ManagedExecutorService mes;

       

      but I get the following error when starting up wildfly with the application deployed

       

      06:22:19,439 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "crowbar-server.war")]) - failure description: {

          "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.crowbar-server.crowbar-server.env.jboss.ee.concurrency.executor.singleThreaded"],

          "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.crowbar-server.crowbar-server.env.\"com.ticomgeo.crowbar.server.ejb.ManagedExecutorExample\".mes is missing [jboss.naming.context.java.module.crowbar-server.crowbar-server.env.jboss.ee.concurrency.executor.singleThreaded]"]

       

      am I missing a step?