Enum ConfigurationKey

java.lang.Object
java.lang.Enum<ConfigurationKey>
org.jboss.weld.config.ConfigurationKey
All Implemented Interfaces:
Serializable, Comparable<ConfigurationKey>, java.lang.constant.Constable

public enum ConfigurationKey extends Enum<ConfigurationKey>
This enum lists all the supported configuration keys.
Author:
Martin Kouba
See Also:
  • Enum Constant Details

    • CONCURRENT_DEPLOYMENT

      public static final ConfigurationKey CONCURRENT_DEPLOYMENT
      Indicates whether ConcurrentDeployer and ConcurrentValidator should be enabled. If enabled, ConcurrentDeployer and ConcurrentValidator execute their subtasks using ExecutorServices which can be configured separately. Otherwise, single-threaded version of Deployer and Validator are used. By default, concurrent deployment is enabled.
    • PRELOADER_THREAD_POOL_SIZE

      public static final ConfigurationKey PRELOADER_THREAD_POOL_SIZE
      The number of threads used by ContainerLifecycleEventPreloader. The ContainerLifecycleEventPreloader allows observer methods for container lifecycle events to be resolved upfront while the deployment is waiting for classloader or reflection API. ContainerLifecycleEventPreloader has its own thread pool whose size is configured by this property. If set to 0, ContainerLifecycleEventPreloader is not installed. If not specified, the value is set to Math.max(1, Runtime.getRuntime().availableProcessors() - 1)).
    • NON_PORTABLE_MODE

      public static final ConfigurationKey NON_PORTABLE_MODE
      Allows an integrator to enable the non-portable mode. Non-portable mode is suggested by the specification to overcome problems with legacy applications not using CDI SPI properly. The non-portable mode is disabled by default.
    • EXECUTOR_THREAD_POOL_SIZE

      public static final ConfigurationKey EXECUTOR_THREAD_POOL_SIZE
      The number of threads to be used for bean loading and deployment.
    • EXECUTOR_THREAD_POOL_DEBUG

      public static final ConfigurationKey EXECUTOR_THREAD_POOL_DEBUG
      If set to true, debug timing information is printed to the standard output.
    • EXECUTOR_THREAD_POOL_TYPE

      public static final ConfigurationKey EXECUTOR_THREAD_POOL_TYPE
      The type of the thread pool. Possible values are: FIXED, FIXED_TIMEOUT, NONE, SINGLE_THREAD, COMMON.
    • EXECUTOR_THREAD_POOL_KEEP_ALIVE_TIME

      public static final ConfigurationKey EXECUTOR_THREAD_POOL_KEEP_ALIVE_TIME
      Keep-alive time in seconds. Passed to the constructor of the ThreadPoolExecutor class, maximum time that excess idle threads will wait for new tasks before terminating.
    • RESOLUTION_CACHE_SIZE

      public static final ConfigurationKey RESOLUTION_CACHE_SIZE
      Weld caches resolved injection points in order to resolve them faster in the future. There exists a separate type safe resolver for beans, decorators, disposers, interceptors and observers. Each of them stores resolved injection points in its cache, which maximum size is bounded by a default value (common to all of them).
      See Also:
    • PROXY_DUMP

      public static final ConfigurationKey PROXY_DUMP
      For debug purposes, it's possible to dump the generated bytecode of proxies and subclasses.
    • RELAXED_CONSTRUCTION

      public static final ConfigurationKey RELAXED_CONSTRUCTION
      Weld supports a non-standard workaround to be able to create client proxies for Java types that cannot be proxied by the container, using non-portable JVM APIs.
    • PROXY_INSTANTIATOR

      public static final ConfigurationKey PROXY_INSTANTIATOR
      Allows ProxyInstantiator to be selected explicitly. This is only intended for testing purposes and should never be set by an application.
    • DISABLE_XML_VALIDATION

      public static final ConfigurationKey DISABLE_XML_VALIDATION
      XML descriptor validation is enabled by default.
    • INJECTABLE_REFERENCE_OPTIMIZATION

      public static final ConfigurationKey INJECTABLE_REFERENCE_OPTIMIZATION
      For certain combinations of scopes, the container is permitted to optimize an injectable reference lookup. The optimization is disabled by default as it does not match the contract.
    • BEAN_IDENTIFIER_INDEX_OPTIMIZATION

      public static final ConfigurationKey BEAN_IDENTIFIER_INDEX_OPTIMIZATION
      This optimization is used to reduce the HTTP session replication overhead. However, the inconsistency detection mechanism may cause problems in some development environments.
    • CONTEXT_ATTRIBUTES_LAZY_FETCH

      public static final ConfigurationKey CONTEXT_ATTRIBUTES_LAZY_FETCH
      If set to true, the attributes should be fetched lazily from the backing store for some contexts (e.g. attributes of an HTTP session for a session context).
    • PROXY_IGNORE_FINAL_METHODS

      public static final ConfigurationKey PROXY_IGNORE_FINAL_METHODS
      Weld supports a non-standard workaround to be able to create proxies for Java types which declare non-private non-static final methods. These methods are completely ignored during proxy generation, and should never be invoked upon the proxy instance!

      A regular expression. If an unproxyable type matches this pattern, the type is considered proxyable and final methods are ignored.

    • CONVERSATION_TIMEOUT

      public static final ConfigurationKey CONVERSATION_TIMEOUT
      Conversation timeout in milliseconds. Default value is 600 000 ms.
    • CONVERSATION_CONCURRENT_ACCESS_TIMEOUT

      public static final ConfigurationKey CONVERSATION_CONCURRENT_ACCESS_TIMEOUT
      Conversation concurrent access timeout in milliseconds represents maximum time to wait on the conversation concurrent lock. Default value is 1000 ms.
    • ROLLING_UPGRADES_ID_DELIMITER

      public static final ConfigurationKey ROLLING_UPGRADES_ID_DELIMITER
      This configuration property should only be used if experiencing problems with rolling upgrades.

      The delimiter is used to abbreviate a bean archive identifier (which is usually derived from the archive name) before used as a part of an identifier of an internal component (such as bean). Note that the delimiter is used for all bean archives forming the application.

      The abbreviation proceeds as follows:

      • Try to find the first occurrence of the specified delimiter
      • If not found, the identifier is not abbreviated
      • If found, try to extract the archive suffix (`.war`, `.ear`, etc.) and the final value consists of the part before the delimiter and the archive suffix (if extracted)

      An example: Given an application with two versions going by the names test__1.1.war and test__1.2.war. Weld normally cannot support replication of @SessionScoped beans between these two deployments. Passing in this option with delimiter "__" will allow Weld to see both applications simply as test.war, hence allowing for session replication.

    • VETO_TYPES_WITHOUT_BEAN_DEFINING_ANNOTATION

      public static final ConfigurationKey VETO_TYPES_WITHOUT_BEAN_DEFINING_ANNOTATION
      A regular expression. If a non-empty string, then all annotated types whose matches this pattern are vetoed if not annotated with a bean defining annotation.
    • ALLOW_OPTIMIZED_CLEANUP

      public static final ConfigurationKey ALLOW_OPTIMIZED_CLEANUP
      If set to true:
      • Weld is allowed to perform efficient cleanup and further optimizations after bootstrap
      • Bootstrap.endInitialization() must be called after all EE components which support injection are installed (that means all relevant ProcessInjectionTarget events were already fired)
      This property can only be set by integrators through ExternalConfiguration.
    • UNUSED_BEANS_EXCLUDE_TYPE

      public static final ConfigurationKey UNUSED_BEANS_EXCLUDE_TYPE
      A regular expression. If ALLOW_OPTIMIZED_CLEANUP is set to true this property can be used to extend the set of beans which should never be considered unused. Bean.getBeanClass() is used to match the pattern.

      Two special values are considered. ConfigurationKey.UnusedBeans.ALL (default value) means that all beans are excluded. If set to ConfigurationKey.UnusedBeans.NONE, no beans are excluded.

      An unused bean:
      • is not excluded by this property or UNUSED_BEANS_EXCLUDE_ANNOTATION
      • is not a built-in bean, session bean, extension, interceptor or decorator,
      • does not have a name
      • does not declare an observer
      • is not eligible for injection to any injection point
      • does not declare a producer which is eligible for injection to any injection point
      • is not eligible for injection into any Instance injection point
      See Also:
    • UNUSED_BEANS_EXCLUDE_ANNOTATION

      public static final ConfigurationKey UNUSED_BEANS_EXCLUDE_ANNOTATION
      A regular expression. If ALLOW_OPTIMIZED_CLEANUP is set to true this property can be used to extend the set of beans which should never be considered unused. A bean is excluded if the corresponding AnnotatedType, or any member, is annotated with an annotation which matches this pattern.

      By default, JAX-RS annotations are considered. If undefined (an empty string), no annotations are considered.

      An unused bean:
      • is not excluded by this property or UNUSED_BEANS_EXCLUDE_ANNOTATION
      • is not a built-in bean, session bean, extension, interceptor or decorator,
      • does not have a name
      • does not declare an observer
      • is not eligible for injection to any injection point
      • does not declare a producer which is eligible for injection to any injection point
      • is not eligible for injection into any Instance injection point
      See Also:
    • RESET_HTTP_SESSION_ATTR_ON_BEAN_ACCESS

      public static final ConfigurationKey RESET_HTTP_SESSION_ATTR_ON_BEAN_ACCESS
      If set to true then when a contextual reference for a @SessionScoped or @ConversationScoped bean is obtained from a context backed by an HTTP session the instance is set again using HttpSession.setAttribute(). This allows to trigger session replication in some application servers.
  • Method Details

    • values

      public static ConfigurationKey[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ConfigurationKey valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public String get()
      Returns:
      the string representation of the key
    • getDefaultValue

      public Object getDefaultValue()
      Returns:
      the default value
    • isIntegratorOnly

      public boolean isIntegratorOnly()
      Returns:
      true if only values set through ExternalConfiguration are considered
    • isValidValue

      public boolean isValidValue(Object value)
      Parameters:
      value -
      Returns:
      true if the given value corresponds to the type of the default value, false otherwise
    • isValidValueType

      public boolean isValidValueType(Class<?> valueType)
      Parameters:
      valueType -
      Returns:
      true if the given value type corresponds to the type of the default value, false otherwise
    • convertValue

      public Object convertValue(String value)
      Parameters:
      value -
      Returns:
      the converted value
    • isValueTypeSupported

      public static boolean isValueTypeSupported(Class<?> valueType)
      Parameters:
      valueType -
      Returns:
      true if the given value type is supported, false otherwise
    • fromString

      public static ConfigurationKey fromString(String from)
      Parameters:
      from -
      Returns:
      the key with the given value, or null if no such exists