/** * Returns a scratch directory that can be used to store things in. * The scratch directory will be persisted accross server restart but * not accross redeployment of the same application * * @param subDirName the sub directory name of the scratch dir * @return the scratch directory for this application based on * passed in subDirName. Returns the root scratch dir if the * passed in value is null. */ public File getScratchDir(String subDirName) { File rootScratchDir = env.getApplicationStubPath(); if (subDirName != null ) rootScratchDir = new File(rootScratchDir, subDirName); String appDirName = VersioningUtils.getRepositoryName(parameters.name()); return new File(rootScratchDir, appDirName); }
/** * Send requests to the client to remove the specified app directory * and all the generated directories. */ private void removeApp(Application app, File base, ModTime mt, Payload.Outbound payload) throws URISyntaxException { if (logger.isLoggable(Level.FINE)) logger.fine("ServerSynchronizer: removing files for application " + mt.name + " because it is no longer deployed to this instance"); try { File dir = fileOf(base, mt.name); removeDir(dir, payload); dir = env.getApplicationCompileJspPath(); removeDir(fileOf(dir, mt.name), payload); dir = env.getApplicationGeneratedXMLPath(); removeDir(fileOf(dir, mt.name), payload); dir = env.getApplicationEJBStubPath(); removeDir(fileOf(dir, mt.name), payload); dir = new File(env.getApplicationStubPath(), "policy"); removeDir(fileOf(dir, mt.name), payload); } catch (IOException ioex) { if (logger.isLoggable(Level.FINE)) { logger.fine("ServerSynchronizer: IOException removing app " + mt.name); logger.fine(ioex.toString()); } } }
gdir = env.getApplicationEJBStubPath(); attachAppDir(fileOf(gdir, mt.name), payload); gdir = new File(env.getApplicationStubPath(), "policy"); attachAppDir(fileOf(gdir, mt.name), payload);
gdir = env.getApplicationEJBStubPath(); attachAppDir(fileOf(gdir, mt.name), payload); gdir = new File(env.getApplicationStubPath(), "policy"); attachAppDir(fileOf(gdir, mt.name), payload); } catch (IOException ioex) {
/** * Send requests to the client to remove the specified app directory * and all the generated directories. */ private void removeApp(Application app, File base, ModTime mt, Payload.Outbound payload) throws URISyntaxException { logger.fine("ServerSynchronizer: removing files for application " + mt.name + " because it is no longer deployed to this instance"); try { File dir = fileOf(base, mt.name); removeDir(dir, payload); dir = env.getApplicationCompileJspPath(); removeDir(fileOf(dir, mt.name), payload); dir = env.getApplicationGeneratedXMLPath(); removeDir(fileOf(dir, mt.name), payload); dir = env.getApplicationEJBStubPath(); removeDir(fileOf(dir, mt.name), payload); dir = new File(env.getApplicationStubPath(), "policy"); removeDir(fileOf(dir, mt.name), payload); } catch (IOException ioex) { logger.fine("ServerSynchronizer: IOException removing app " + mt.name); logger.fine(ioex.toString()); } }
appsStubRoot = instance.getApplicationStubPath().getAbsolutePath();