Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-23359

[GSS](7.4.z) ManagedScheduledExecutorService throws IllegalStateException when trying to submit during startup but the other executors do not

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • Concurrency Utilities
    • None
    • False
    • None
    • False

    Description

      EJb's init() with ManagedScheduledExecutorService new thread returns IllegalStateException but others do not.

      Is this a bug or is there a reason that ManagedScheduledExecutorService cannot run the task when ManagedThreadFactory and ManagedThreadFactory can?

      Stack of  the error:

      15:09:27,299 INFO  [stdout] (EE-ManagedExecutorService-default-Thread-1) Running MES@1647032967298
      15:09:27,298 ERROR [org.jboss.as.ee] 
      (EE-ManagedScheduledExecutorService-default-Thread-1) WFLYEE0110: Failed
       to run scheduled task: java.lang.IllegalStateException: WFLYEE0111: 
      Cannot run scheduled task 
      org.demo.web.servlet.CallCountServlet$2@2ef3c389 as container is 
      suspended
              at org.jboss.as.ee.concurrent.ControlPointUtils$ControlledScheduledRunnable.run(ControlPointUtils.java:184)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.glassfish.enterprise.concurrent.internal.ManagedFutureTask.run(ManagedFutureTask.java:117)
              at 
      org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.access$101(ManagedScheduledThreadPoolExecutor.java:360)
              at 
      org.glassfish.enterprise.concurrent.internal.ManagedScheduledThreadPoolExecutor$ManagedScheduledFutureTask.run(ManagedScheduledThreadPoolExecutor.java:509)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
              at org.glassfish.enterprise.concurrent.ManagedThreadFactoryImpl$ManagedThread.run(ManagedThreadFactoryImpl.java:227)
       
        

      Attachments

        1. reproducer.jar
          3 kB
        2. TestSingleton.jar
          0.3 kB
        3. TestSingleton.java
          1 kB

        Activity

          People

            istudens@redhat.com Ivo Studensky
            emartins@redhat.com Eduardo Martins
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: