4 Replies Latest reply on May 22, 2013 11:21 AM by liverpoolilove

    Aboaut JBoss thread pool of issues

    liverpoolilove

            I want to use the the JBoss's thread pool, this configuration you?

        <subsystem xmlns="urn:jboss:domain:threads:1.1">

                            <bounded-queue-thread-pool name="test" allow-core-timeout="false">

                      <core-threads count="5"/>

                      <queue-length count="1"/>

                      <max-threads count="20"/>

                      <keepalive-time time="10" unit="seconds"/>

                  </bounded-queue-thread-pool>

                          </subsystem>

      How do I access the thread pool in code?

        • 1. Re: Aboaut JBoss thread pool of issues
          wdfink

          Thread pools can be configured for different use (i.e. EJB, timer, web ...).

          A direct access is not recommended as you should not controll threads in the application code, this is the responsibility of the container.

           

          Or do I missunderstand your question?

          • 2. Re: Aboaut JBoss thread pool of issues
            liverpoolilove

            First, thank you for your reply !

            I do not want to control these threads, but want to use them to do something.

            Thread pools can be configured for different use (i.e. EJB, timer, web ...).?

            timer?  standalone-ha.xml have configured timer thread pool?

            I'm using jboss7.

            • 3. Re: Aboaut JBoss thread pool of issues
              wdfink

              MIchael,

              I move the thread to the appropriate forum.

               

              I did not understand your needs, from the EJB spec you should not deal with threads.

               

              Do do something you might use timers (i.e. @Schedule annotations for EJB) to start a action by specifying a time.

              So please explain what you want to achieve, in that case we might able to give you some hints how to do.

              • 4. Re: Aboaut JBoss thread pool of issues
                liverpoolilove

                Our company has a regularly scheduled task framework, is the company's employees own development. Thread pool is not used before, and before using websphere container, concurrency control is how to do that I was not very clear. Now wants to migrate to Jboss existing projects under the container, and use the thread pool to do so Jboss concurrency control execution Job, I now want to do things like