diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeJavaTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeJavaTemplate.java index f6363b63c40..79c9cdb135f 100644 --- a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeJavaTemplate.java +++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeJavaTemplate.java @@ -33,6 +33,8 @@ public class ProjectRuntime implements KieRuntimeBuilder { private static final ProjectModel model = new ProjectModel(); private static final java.util.Map kbases = initKieBases(); + private org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); + public static final ProjectRuntime INSTANCE = new ProjectRuntime(); private static java.util.Map initKieBases() { @@ -88,7 +90,6 @@ private KieBase getKieBaseForSession(String sessionName) { } private org.kie.api.runtime.KieSessionConfiguration getConfForSession(String sessionName) { - org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); switch(sessionName) { // populated via codegen } diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java index 5f4da3847b9..8efae48eda5 100644 --- a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java +++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeQuarkusTemplate.java @@ -34,6 +34,8 @@ public class ProjectRuntime implements KieRuntimeBuilder { private static final ProjectModel model = new ProjectModel(); private static final java.util.Map kbases = initKieBases(); + private org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); + public static final ProjectRuntime INSTANCE = new ProjectRuntime(); private static java.util.Map initKieBases() { @@ -89,7 +91,6 @@ private KieBase getKieBaseForSession(String sessionName) { } private org.kie.api.runtime.KieSessionConfiguration getConfForSession(String sessionName) { - org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); switch(sessionName) { // populated via codegen } diff --git a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeSpringTemplate.java b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeSpringTemplate.java index 13ac7e0e26e..c83245ff030 100644 --- a/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeSpringTemplate.java +++ b/drools-model/drools-model-codegen/src/main/resources/class-templates/rules/ProjectRuntimeSpringTemplate.java @@ -34,6 +34,8 @@ public class ProjectRuntime implements KieRuntimeBuilder { private static final ProjectModel model = new ProjectModel(); private static final java.util.Map kbases = initKieBases(); + private org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); + public static final ProjectRuntime INSTANCE = new ProjectRuntime(); private static java.util.Map initKieBases() { @@ -89,7 +91,6 @@ private KieBase getKieBaseForSession(String sessionName) { } private org.kie.api.runtime.KieSessionConfiguration getConfForSession(String sessionName) { - org.drools.core.SessionConfiguration conf = org.drools.core.impl.RuleBaseFactory.newKnowledgeSessionConfiguration().as(SessionConfiguration.KEY); switch(sessionName) { // populated via codegen } diff --git a/kie-internal/src/main/java/org/kie/internal/utils/ChainedProperties.java b/kie-internal/src/main/java/org/kie/internal/utils/ChainedProperties.java index 5718641c384..85b84bc2568 100644 --- a/kie-internal/src/main/java/org/kie/internal/utils/ChainedProperties.java +++ b/kie-internal/src/main/java/org/kie/internal/utils/ChainedProperties.java @@ -43,11 +43,6 @@ *
  • META-INF/ of provided classLoader
  • * *
    - * To improve performance in frequent session creation cases, chained properties can be cached by it's conf file name - * and requesting classloader. To take advantage of the case it must be enabled via system property:
    - * org.kie.property.cache.enabled that needs to be set to true - * Cache entries are by default limited to 100 to reduce memory consumption but can be fine tuned by system property:
    - * org.kie.property.cache.size that needs to be set to valid integer value */ public class ChainedProperties implements