@Override public Object instantiate(Class<?> rulesClass) throws RulesInstantiationException { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClassLoader()); try { return getEngineFactory().newEngineInstance(); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } }
@Override public Object instantiate(Class<?> rulesClass) throws RulesInstantiationException { ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClassLoader()); try { return getEngineFactory().newEngineInstance(); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } }
@Override public Object instantiate(Class<?> rulesClass) throws RulesInstantiationException { // Ensure that instantiation will be done in strategy classLoader. // ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClassLoader()); try { return getEngineFactory().newEngineInstance(); } catch (Exception e) { throw new RulesInstantiationException(e); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } }
@Override public Object instantiate(Class<?> rulesClass) throws RulesInstantiationException { // Ensure that instantiation will be done in strategy classLoader. // ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(getClassLoader()); try { return getEngineFactory().newEngineInstance(); } catch (Exception e) { throw new RulesInstantiationException(e); } finally { Thread.currentThread().setContextClassLoader(oldClassLoader); } }
private ContextPropertyDefinition[] loadContextPropertyDefinitions() { RulesEngineFactory<IContextPropertyDefinitionLoader> engineFactory = new RulesEngineFactory<IContextPropertyDefinitionLoader>( CodeGenConstants.DEFINITIONS_XLS, IContextPropertyDefinitionLoader.class); return engineFactory.newEngineInstance().getContextDefinitions(); }
private TablePropertyDefinition[] loadTablePropertyDefinitions() { RulesEngineFactory<ITablePropertyDefinitionLoader> engineFactory = new RulesEngineFactory<ITablePropertyDefinitionLoader>( CodeGenConstants.DEFINITIONS_XLS, ITablePropertyDefinitionLoader.class); return engineFactory.newEngineInstance().getDefinitions(); }
private String[] loadTablePriorityRules() { RulesEngineFactory<ITablesPriorityLoader> engineFactory = new RulesEngineFactory<ITablesPriorityLoader>( CodeGenConstants.DEFINITIONS_XLS, ITablesPriorityLoader.class); return engineFactory.newEngineInstance().getTablesPriorityRules(); }