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?
If you're using the lookup attribute I think you need the full JNDI name. If you want to leave the java: off then you could do that using the name attribute on the @Resource annotation instead.
--
James R. Perkins