tyrus
  1. tyrus
  2. TYRUS-157

Submitting tasks to an injected ManagedExecutorService in a ServerEndpoint does not work

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • Environment:

      Glassfish 4 build 81

      Description

      To replicate the issue, inject a ManagedExecutorService inside a ServerEndpoint.

      • Using InitialContext:

      InitialContext ic = new InitialContext();
      ManagedExecutorService mes = (ManagedExecutorService) ic.lookup("java:comp/DefaultManagedExecutorService");

      • Using @Resource:

      @Resource(lookup = "concurrent/__defaultManagedExecutorService")
      ManagedExecutorService mes;

      The MES is injected correctly (no null pointer). Inside one of the annotated methods, such as @OnOpen, submit a task to the MES. The task does not run:

      mes.execute(new Runnable() {
      @Override
      public void run()

      { logger.log(Level.INFO, "runnnningEEEEE333443"); }

      });

        Activity

        rcervera created issue -
        stepan.kopriva made changes -
        Field Original Value New Value
        Fix Version/s 1.0-rc1 [ 16364 ]
        Pavel Bucek made changes -
        Fix Version/s 1.0-backlog [ 16081 ]
        Fix Version/s 1.0-rc1 [ 16364 ]
        Pavel Bucek made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Pavel Bucek [ pavel_bucek ]
        Fix Version/s 1.3 [ 16600 ]
        Fix Version/s 1.x-backlog [ 16081 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            rcervera
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: