/** * Create the final Avalon context passed to YAAFI containing * <ul> * <li>user-supplied context</li> * <li>urn:avalon:home</li> * <li>urn:avalon:temp</li> * <li>urn:avalon:name</li> * <li>urn:avalon:partition</li> * <li>urn:avalon:classloader</li> * </ul> * * @return the final Context * @throws Exception if filename not defined * @throws IOException if file not found */ public Context createFinalContext() throws IOException, Exception { // 1) add the application root dir this.addToContext(AvalonMerlinConstants.URN_AVALON_HOME, this.getApplicationRootDir()); // 2) add the temp root dir this.addToContext(AvalonMerlinConstants.URN_AVALON_TEMP, this.getTempRootDir()); // 3) add the Avalon name this.addToContext(AvalonMerlinConstants.URN_AVALON_NAME, ServiceConstants.ROLE_NAME); // 4) add the Avalon partition name this.addToContext(AvalonMerlinConstants.URN_AVALON_PARTITION, "root"); // 5) add the class loader this.addToContext(AvalonMerlinConstants.URN_AVALON_CLASSLOADER, this.getComponentClassLoader()); return this.getContext(); }