private AppReloadInfo(Application app) throws URISyntaxException { this.app = app; appDir = new File(new URI(app.getLocation())); reloadFile = new File(appDir, RELOAD_FILE_NAME); recordLoad(); }
public String getLocation(String moduleID) { ApplicationName module = getModule(moduleID); if (module == null) { return null; } String location = null; if (module instanceof Application) { location = ((Application)module).getLocation(); } try { if (location != null) { return new URI(location).getPath(); } else { return null; } } catch (URISyntaxException e) { return null; } }
/** * Gets the deployment location for a J2EE application. * @param appName application name * @return application deploy location */ public String getApplicationDeployLocation(String appName) { String location = null; Application app = getApplicationByName(appName); if(app != null){ //TODO V3 with annotations, is this right location ? location = RelativePathResolver.resolvePath(app.getLocation()); } return location; }
private synchronized AppReloadInfo findOrCreateAppReloadInfo(Application app) throws URISyntaxException { AppReloadInfo result = appReloadInfo.get(app.getName()); if (result == null) { logger.fine("[Reloader] Recording info for new app " + app.getName() + " at " + app.getLocation()); result = new AppReloadInfo(app); appReloadInfo.put(app.getName(), result); } return result; }
private File repackageArchive(Application app) throws IOException { URI uri = null; try { uri = new URI(app.getLocation()); } catch (URISyntaxException e) { logger.log(Level.SEVERE, e.getMessage(), e);
/** * @param directory * @return the name of the version currently using the directory, else null * @throws VersioningDeploymentSyntaxException */ public String getVersionFromSameDir(File dir) throws VersioningDeploymentSyntaxException{ try { Iterator it = domain.getApplications().getApplications().iterator(); Application app = null; // check if directory deployment exist while ( it.hasNext() ) { app = (Application) it.next(); if (app.getLocation().equals(dir.toURI().toString())) { if(!VersioningDeploymentUtil.getUntaggedName(app.getName()).equals(app.getName())){ return app.getName(); } } } } catch (VersioningDeploymentSyntaxException ex) { // return null if an exception is thrown } return null; } }
/** * Records reload information about the currently-known applications. * * @param applications */ private synchronized void initAppReloadInfo(Applications applications) throws URISyntaxException { appReloadInfo = new HashMap<String,AppReloadInfo>(); logger.fine("[Reloader] Preparing list of apps to monitor:"); for (ApplicationName m : applications.getModules()) { if (m instanceof Application) { Application app = (Application) m; if (Boolean.valueOf(app.getDeployProperties().getProperty (ServerTags.IS_LIFECYCLE))) { // skip lifecycle modules continue; } AppReloadInfo info = new AppReloadInfo(app); appReloadInfo.put(app.getName(), info); logger.fine("[Reloader] Monitoring " + app.getName() + " at " + app.getLocation()); } } }
/** * Get the version directory-deployed from the given directory * * @param directory * @return the name of the version currently using the directory, else null * @throws VersioningSyntaxException * */ public String getVersionFromSameDir(File dir) throws VersioningSyntaxException{ try { Iterator it = domain.getApplications().getApplications().iterator(); Application app = null; // check if directory deployment exist while ( it.hasNext() ) { app = (Application) it.next(); if (app.getLocation().equals(dir.toURI().toString())) { if(!VersioningUtils.getUntaggedName(app.getName()).equals(app.getName())){ return app.getName(); } } } } catch (VersioningSyntaxException ex) { // return null if an exception is thrown } return null; } }
uri = new URI(app.getLocation()); } catch (URISyntaxException e) { Logger.getAnonymousLogger().log(
uri = new URI(app.getLocation()); } catch (URISyntaxException e) { Logger.getAnonymousLogger().log(
public static String getLocation(String moduleID) { ApplicationName module = getModule(moduleID); if (module == null) { return null; } String location = null; if (module instanceof Application) { location = ((Application)module).getLocation(); } else if (module instanceof WebModule) { location = ((WebModule)module).getLocation(); } else if (module instanceof EjbModule) { location = ((EjbModule)module).getLocation(); } else if (module instanceof ConnectorModule) { location = ((ConnectorModule)module).getLocation(); } else if (module instanceof AppclientModule) { location = ((AppclientModule)module).getLocation(); } else if (module instanceof J2eeApplication) { location = ((J2eeApplication)module).getLocation(); } try { if (location != null) { return new URI(location).getPath(); } else { return null; } } catch (URISyntaxException e) { return null; } }
String location = appBean.getLocation(); String moduleDir = DeploymentUtils.getRelativeEmbeddedModulePath( location, moduleID);
continue; logger.log(Level.INFO, "Redeploy application " + app.getName() + " located at " + app.getLocation());
String source = app.getLocation(); final String appName = app.getName();
Map<String, Properties> modulePropsMap = app.getModulePropertiesMap(); ApplicationConfigInfo savedAppConfig = new ApplicationConfigInfo(app); URI uri = new URI(app.getLocation()); File file = new File(uri);
Map<String, Properties> modulePropsMap = app.getModulePropertiesMap(); ApplicationConfigInfo savedAppConfig = new ApplicationConfigInfo(app); URI uri = new URI(app.getLocation()); File file = new File(uri);
URI uri = new URI(app.getLocation()); File file = new File(uri); deployment.deploy(deployment.getSniffersFromApp(app), deploymentContext); } else { logger.log(Level.SEVERE, KernelLoggerInfo.notFoundInOriginalLocation, app.getLocation());
savedAppConfig = new ApplicationConfigInfo(app); URI uri = new URI(app.getLocation()); file = new File(uri); String location = DeploymentUtils.relativizeWithinDomainIfPossible(new URI(app.getLocation())); appProps.setProperty(ServerTags.LOCATION, location);
source = appInfo.getSource(); } else { File location = new File(new URI(application.getLocation())); source = archiveFactory.openArchive(location);
final MetadataImpl meta) final String appLocation = appConfig.getLocation();