Class JEEConcurrencyFactory

java.lang.Object
se.laz.casual.network.outbound.JEEConcurrencyFactory

public class JEEConcurrencyFactory extends Object
  • Field Details

    • DEFAULT_MANAGED_SCHEDULED_EXECUTOR_SERVICE_NAME_JBOSS_DIRECT

      public static final String DEFAULT_MANAGED_SCHEDULED_EXECUTOR_SERVICE_NAME_JBOSS_DIRECT
      See Also:
    • DEFAULT_MANAGED_SCHEDULED_EXECUTOR_SERVICE_NAME_INDIRECT

      public static final String DEFAULT_MANAGED_SCHEDULED_EXECUTOR_SERVICE_NAME_INDIRECT
      See Also:
    • CASUAL_UNMANAGED_SCHEDULED_EXECUTOR_SERVICE_POOL_SIZE_ENV_NAME

      public static final String CASUAL_UNMANAGED_SCHEDULED_EXECUTOR_SERVICE_POOL_SIZE_ENV_NAME
      See Also:
    • DEFAULT_CASUAL_UNMANAGED_SCHEDULED_EXECUTOR_SERVICE_POOL_SIZE

      public static final int DEFAULT_CASUAL_UNMANAGED_SCHEDULED_EXECUTOR_SERVICE_POOL_SIZE
      See Also:
  • Method Details

    • getManagedExecutorService

      public static jakarta.enterprise.concurrent.ManagedExecutorService getManagedExecutorService()
      Gets default managed executor service - on jboss On wls it will throw CasualResourceAdapterException unless a direct JNDI-name is configured
      Returns:
      an ExecutorService
    • getManagedScheduledExecutorService

      public static ScheduledExecutorService getManagedScheduledExecutorService()
      Gets the default ManagedScheduledExecutorService on jboss. On some non-standard implementation it will fetch the default through java:comp/DefaultManagedScheduledExecutorService which normally shouldn't be accessible in this context.

      If both of those fail a ScheduledExecutorService instance will be created through the standard java.util.concurrent.Executor which will share the same ScheduledExecutorService among all users.

      Returns:
      A ScheduledExecutorService instance.