此内容没有您所选择的语言版本。
A.2. Environment Properties
As opposed to system properties, environment properties are passed to an individual KieSession
, allowing you to control its behaviour independently on the rest of the deployment.
The properties available to you are the constants of the class org.kie.api.runtime.EnvironmentName
.
A.2.1. Configuration 复制链接链接已复制到粘贴板!
To set the environment properties on a KieSession
, you can create a new session with an instance of the Environment
or RuntimeEnvironment
interface:
Setting Environment Property using Environment
interface
Environment env = EnvironmentFactory.newEnvironment(); env.set(EnvironmentName.SAMPLE_PROPERTY, true); kbase.newKieSession(null, env);
Environment env = EnvironmentFactory.newEnvironment();
env.set(EnvironmentName.SAMPLE_PROPERTY, true);
kbase.newKieSession(null, env);
Setting Environment Property using RuntimeEnvironment
interface
A.2.2. List of Environment Properties 复制链接链接已复制到粘贴板!
This section contains the alphabetically sorted list of all recognized environment properties in Red Hat JBoss BPM Suite 6.3.
Red Hat JBoss BPM Suite Environment Properties
- APP_SCOPED_ENTITY_MANAGER
The entity manager used for persistence of
SessionInfo
. You can specify it when using Spring with local transactions and a shared entity manager.Expand Values Default An instance of
EntityManager
Automatically created from the provided
EntityManagerFactory
- CALENDARS
- This property is not used.
- CMD_SCOPED_ENTITY_MANAGER
The entity manager used for persistence of entities (process instances, tasks, work items). You can specify it when using Spring with local transactions and a shared entity manager.
Expand Values Default An instance of
EntityManager
Automatically created from the provided
EntityManagerFactory
- DATE_FORMATS
- This property is not used.
- ENTITY_MANAGER_FACTORY
The
EntityManagerFactory
used in the Red Hat JBoss BPM Suite engine.Expand Values Default An instance of
EntityManagerFactory
N/A
- GLOBALS
Expand Values Default Any object declared in DRL or BPMN
N/A
- OBJECT_MARSHALLING_STRATEGIES
Enable use of pluggable variable persistence strategies. Allows storing variables in different data stores.
Expand Values Default An instance of
org.kie.api.marshalling.ObjectMarshallingStrategy
Dependent on the engine configuration. If no other strategy is available,
org.drools.core.marshalling.impl.SerializablePlaceholderResolvingStrategy
is used.- PERSISTENCE_CONTEXT_MANAGER
The
ProcessPersistenceContextManager
instance used for process persistence.Expand Values Default An instance of
org.jbpm.persistence.ProcessPersistenceContextManager
An instance of
org.jbpm.persistence.JpaProcessPersistenceContextManager
- TASK_PERSISTENCE_CONTEXT_MANAGER
The
TaskPersistenceContextManager
instance used for task persistence.Expand Values Default An instance of
org.kie.internal.task.api.TaskPersistenceContextManager
An instance of
org.jbpm.services.task.persistence.JPATaskPersistenceContextManager
- TASK_USER_GROUP_CALLBACK
Get the
UserGroupCallback
instance from the environment or context. For example:callback = context.get(EnvironmentName.TASK_USER_GROUP_CALLBACK)
callback = context.get(EnvironmentName.TASK_USER_GROUP_CALLBACK)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Values Default Configured by Red Hat JBoss BPM Suite
An instance of
org.kie.internal.task.api.UserGroupCallback
- TASK_USER_INFO
Get the
UserInfo
instance from the environment or context. For example:info = context.get(EnvironmentName.TASK_USER_INFO)
info = context.get(EnvironmentName.TASK_USER_INFO)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Values Default Configured by Red Hat JBoss BPM Suite
An instance of
org.kie.internal.task.api.UserInfo
- TRANSACTION
Optional property if
UserTransaction
can not be obtained using JNDI lookup.Expand Values Default An instance of
UserTransaction
null
- TRANSACTION_MANAGER
Get the
TransactionManager
instance from the environment or context. For example:info = context.get(EnvironmentName.TRANSACTION_MANAGER)
info = context.get(EnvironmentName.TRANSACTION_MANAGER)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Expand Values Default An instance of
TransactionManager
Depends on your configuration
- TRANSACTION_SYNCHRONIZATION_REGISTRY
Allows access to and control of the active transaction. Used by Red Hat JBoss BPM Suite to efficiently manage persistence.
Expand Values Default An instance of
TransactionSynchronizationRegistry
Taken from the environment—usually JNDI lookup in JTA environments
- USE_LOCAL_TRANSACTIONS
When enabled, Red Hat JBoss BPM Suite uses local transactions as opposed to JTA.
Expand Values Default true
orfalse
false
- USE_PESSIMISTIC_LOCKING
When enabled, a database resource can only be accessed by one transaction at a time.
Expand Values Default true
orfalse
false