@Override protected VariationsResult<Object> compute() { OpenLRulesInvocationHandler handler = null; try { if (runtimeEnv instanceof SimpleRulesRuntimeEnv) { if (Proxy.isProxyClass(serviceClassInstance.getClass())) { handler = (OpenLRulesInvocationHandler) Proxy.getInvocationHandler(serviceClassInstance); handler.setRuntimeEnv(runtimeEnv); } SimpleRulesRuntimeEnv simpleRulesRuntimeEnv = ((SimpleRulesRuntimeEnv) runtimeEnv); simpleRulesRuntimeEnv.changeMethodArgumentsCacheMode(org.openl.rules.vm.CacheMode.READ_ONLY); simpleRulesRuntimeEnv.setOriginalCalculation(false); simpleRulesRuntimeEnv.setIgnoreRecalculate(true); simpleRulesRuntimeEnv.getArgumentCachingStorage().initCurrentStep(); } return calculateSingleVariation(member, arguments, variation); } catch (Exception e) { log.error("Failed to calculate variation!", e); throw e; } finally { if (handler != null) handler.release(); } } }
@Override protected VariationsResult<Object> compute() { OpenLRulesInvocationHandler handler = null; try { if (runtimeEnv instanceof SimpleRulesRuntimeEnv) { if (Proxy.isProxyClass(serviceClassInstance.getClass())) { handler = (OpenLRulesInvocationHandler) Proxy.getInvocationHandler(serviceClassInstance); handler.setRuntimeEnv(runtimeEnv); } SimpleRulesRuntimeEnv simpleRulesRuntimeEnv = ((SimpleRulesRuntimeEnv) runtimeEnv); simpleRulesRuntimeEnv.changeMethodArgumentsCacheMode(org.openl.rules.vm.CacheMode.READ_ONLY); simpleRulesRuntimeEnv.setOriginalCalculation(false); simpleRulesRuntimeEnv.setIgnoreRecalculate(true); simpleRulesRuntimeEnv.getArgumentCachingStorage().initCurrentStep(); } return calculateSingleVariation(member, arguments, variation); } catch (Exception e) { log.error("Failed to calculate variation!", e); throw e; } finally { if (handler != null) handler.release(); } } }
final OpenLRulesInvocationHandler handler = (OpenLRulesInvocationHandler) Proxy .getInvocationHandler(serviceClassInstance); handler.setRuntimeEnv(runtimeEnv); SimpleRulesRuntimeEnv simpleRulesRuntimeEnv = ((SimpleRulesRuntimeEnv) runtimeEnv); simpleRulesRuntimeEnv.changeMethodArgumentsCacheMode(org.openl.rules.vm.CacheMode.READ_ONLY);
final OpenLRulesInvocationHandler handler = (OpenLRulesInvocationHandler) Proxy .getInvocationHandler(serviceClassInstance); handler.setRuntimeEnv(runtimeEnv); SimpleRulesRuntimeEnv simpleRulesRuntimeEnv = ((SimpleRulesRuntimeEnv) runtimeEnv); simpleRulesRuntimeEnv.changeMethodArgumentsCacheMode(org.openl.rules.vm.CacheMode.READ_ONLY);