Using the same definition for several decision engines

To reduce memory consumption, you can create several engines for concurrent use from the same engine definition.

About this task

Creating several engines from one engine definition, instead of loading an engine definition to create each engine, reduces memory consumption. It does not degrade performance.

Rule Execution Server directly supports concurrent executions.

If you do not want to use Rule Execution Server, use an engine, as an Engine instance, in only one thread.

Do not use the same objects in different engines in different threads.

Procedure

To create several engines from the same definition, use the following code:
EngineDefinition definition = ...
Engine engine1 = definition.createEngine();
Engine engine2 = definition.createEngine();