4 Replies Latest reply on Jan 21, 2014 5:09 AM by Wolf-Dieter Fink

    Creating threads inside an application

    Vlad Arkhipov Newbie

      Since EJB discourages creating new threads inside business methods, what is the proper way to create new threads with WidlFly? There is a third-party library that accepts java.util.concurrent.Executor as a parameter. I saw examples of using jboss:domain:threads subsystem to create executors from JBoss module (Infinispan uses this approach). But how can I get access to this service from a non-module code (in a deployment)? Is it allowed to use org.jboss.as.server.CurrentServiceContainer to get a reference to ThreadPool from a deployment?