/** * Fetches the root environement tied to the engine. */ public Environment fetchEngineEnvironment () { final Environment e = getStore().loadEngineEnvironment(); e.setApplicationContext(this.getContext()); return e; }
public Environment fetchEngineEnvironment () { Environment result = (Environment)fetch(EngineEnvironmentId.ID); if (result == null) { if (getStore() == null) { final Environment ee = new Environment(); ee.setId(EngineEnvironmentId.ID); ee.setApplicationContext(this.getContext()); this.expressionMap.put(ee.getId(), ee); return ee; } result = getStore().loadEngineEnvironment(); try { this.update(result); } catch (final PoolException pe) { log.warn("Failed to store Engine Environment.", pe); } } return result; }