Factory responsible for producing instances of RuntimeEnvironment that are consumed by
RuntimeManager
upon creation. It allows to create following types of
RuntimeEnvironment
(that mainly means what is
configured by default):
- DEFAULT - default (most common) configuration for RuntimeManager
- EMPTY - completely empty environment to be manually populated
- DEFAULT_IN_MEMORY - same as DEFAULT but without persistence of the runtime engine
- DEFAULT_KJAR - same as DEFAULT but knowledge asset are taken from KJAR identified by releaseid or GAV
- DEFAULT_KJAR_CL - build directly from classpath that consists kmodule.xml descriptor
Mandatory properties depends on the type selected but knowledge information must be given for all types. That means
that one of the following is provided:
- knowledgeBase
- assets
- releaseId
- groupId, artifactId, version
Next for DEFAULT, DEFAULT_KJAR, DEFAULT_KJAR_CL persistence needs to be configured:
- entity manager factory
- transaction manager
Transaction Manager must be Spring transaction manager as based on its presence entire
persistence and transaction support is configured.
Optionally
entityManager
can be provided to be used instead of always
creating new one from EntityManagerFactory - e.g. when using shared entity manager from Spring.
All other properties are optional and are meant to override the default given by type of the environment selected.