Class BaseContainer

    • Constructor Detail

      • BaseContainer

        public BaseContainer()
    • Method Detail

      • getExecutorService

        public java.util.concurrent.ExecutorService getExecutorService()
        Returns a container-managed ExecutorService registered under java:comp/DefaultManagedExecutorService or if the lookup has failed, it returns a ExecutorService created and managed by this instance of BaseContainer.
        Specified by:
        getExecutorService in class ExecutorServiceProvider
        Returns:
        executor service.
      • getScheduledExecutorService

        public java.util.concurrent.ScheduledExecutorService getScheduledExecutorService()
        Returns a container-managed ScheduledExecutorService registered under java:comp/DefaultManagedScheduledExecutorService or if the lookup has failed it returns a ScheduledExecutorService created and managed by this instance of BaseContainer.
        Specified by:
        getScheduledExecutorService in class ExecutorServiceProvider
        Returns:
        scheduled executor service.
      • shutdown

        public void shutdown()
        Release executor services managed by this instance. Executor services obtained via JNDI lookup won't be shut down.
      • shutdown

        protected void shutdown​(BaseContainer.ShutDownCondition shutDownCondition)
        Release executor services managed by this instance if the condition passed in the parameter is fulfilled. Executor services obtained via JNDI lookup won't be shut down.
        Parameters:
        shutDownCondition - condition that will be evaluated before executor services are released and they will be released only if the condition is evaluated to true. The condition will be evaluated in a synchronized block in order to make the process of its evaluation and executor services release an atomic operation.