/** * Process a "start" event for this Host. */ private void start() { if (host.getLogger().isDebugEnabled()) host.getLogger().debug(sm.getString("userConfig.start")); deploy(); }
/** * Initialize our set of users and home directories. */ private void init() { String homeBase = userConfig.getHomeBase(); File homeBaseDir = new File(homeBase); if (!homeBaseDir.exists() || !homeBaseDir.isDirectory()) return; String homeBaseFiles[] = homeBaseDir.list(); for (int i = 0; i < homeBaseFiles.length; i++) { File homeDir = new File(homeBaseDir, homeBaseFiles[i]); if (!homeDir.isDirectory() || !homeDir.canRead()) continue; homes.put(homeBaseFiles[i], homeDir.toString()); } }
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { String msg = MessageFormat.format(rb.getString(LogFacade.LIFECYCLE_OBJECT_NOT_HOST_EXCEPTION), event.getLifecycle()); log(msg, e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
while (users.hasMoreElements()) { String user = users.nextElement(); if (!isDeployAllowed(user)) continue; String home = database.getHome(user); results.add(executor.submit(new DeployUserDirectory(this, user, home)));
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
/** * Deploy a web application for any user who has a web application present * in a directory with a specified name within their home directory. */ private void deploy() { if (debug >= 1) log(rb.getString(LogFacade.DEPLOYING_USER_WEB_APP_INFO)); // Load the user database object for this host UserDatabase database = null; try { Class clazz = Class.forName(userClass); database = (UserDatabase) clazz.newInstance(); database.setUserConfig(this); } catch (Exception e) { log(rb.getString(LogFacade.LOADING_USER_DATABASE_EXCEPTION), e); return; } // Deploy the web application (if any) for each defined user Enumeration users = database.getUsers(); while (users.hasMoreElements()) { String user = (String) users.nextElement(); String home = database.getHome(user); deploy(user, home); } }
while (users.hasMoreElements()) { String user = users.nextElement(); if (!isDeployAllowed(user)) continue; String home = database.getHome(user); results.add(executor.submit(new DeployUserDirectory(this, user, home)));
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
/** * Process a "start" event for this Host. */ private void start() { if (host.getLogger().isDebugEnabled()) host.getLogger().debug(sm.getString("userConfig.start")); deploy(); }
/** * Initialize our set of users and home directories. */ private void init() { String homeBase = userConfig.getHomeBase(); File homeBaseDir = new File(homeBase); if (!homeBaseDir.exists() || !homeBaseDir.isDirectory()) return; String homeBaseFiles[] = homeBaseDir.list(); for (int i = 0; i < homeBaseFiles.length; i++) { File homeDir = new File(homeBaseDir, homeBaseFiles[i]); if (!homeDir.isDirectory() || !homeDir.canRead()) continue; homes.put(homeBaseFiles[i], homeDir.toString()); } }
while (users.hasMoreElements()) { String user = users.nextElement(); if (!isDeployAllowed(user)) continue; String home = database.getHome(user); results.add(executor.submit(new DeployUserDirectory(this, user, home)));
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ @Override public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
/** * Deploy a web application for any user who has a web application present * in a directory with a specified name within their home directory. */ private void deploy() { if (host.getLogger().isDebugEnabled()) host.getLogger().debug(sm.getString("userConfig.deploying")); // Load the user database object for this host UserDatabase database = null; try { Class clazz = Class.forName(userClass); database = (UserDatabase) clazz.newInstance(); database.setUserConfig(this); } catch (Exception e) { host.getLogger().error(sm.getString("userConfig.database"), e); return; } // Deploy the web application (if any) for each defined user Enumeration users = database.getUsers(); while (users.hasMoreElements()) { String user = (String) users.nextElement(); String home = database.getHome(user); deploy(user, home); } }
/** * Initialize our set of users and home directories. */ private void init() { String homeBase = userConfig.getHomeBase(); File homeBaseDir = new File(homeBase); if (!homeBaseDir.exists() || !homeBaseDir.isDirectory()) return; String homeBaseFiles[] = homeBaseDir.list(); for (int i = 0; i < homeBaseFiles.length; i++) { File homeDir = new File(homeBaseDir, homeBaseFiles[i]); if (!homeDir.isDirectory() || !homeDir.canRead()) continue; homes.put(homeBaseFiles[i], homeDir.toString()); } }
while (users.hasMoreElements()) { String user = users.nextElement(); if (!isDeployAllowed(user)) continue; String home = database.getHome(user); results.add(executor.submit(new DeployUserDirectory(this, user, home)));
/** * Process the START event for an associated Host. * * @param event The lifecycle event that has occurred */ public void lifecycleEvent(LifecycleEvent event) { // Identify the host we are associated with try { host = (Host) event.getLifecycle(); } catch (ClassCastException e) { log.error(sm.getString("hostConfig.cce", event.getLifecycle()), e); return; } // Process the event that has occurred if (event.getType().equals(Lifecycle.START_EVENT)) start(); else if (event.getType().equals(Lifecycle.STOP_EVENT)) stop(); }
/** * Deploy a web application for any user who has a web application present * in a directory with a specified name within their home directory. */ private void deploy() { if (host.getLogger().isDebugEnabled()) host.getLogger().debug(sm.getString("userConfig.deploying")); // Load the user database object for this host UserDatabase database = null; try { Class clazz = Class.forName(userClass); database = (UserDatabase) clazz.newInstance(); database.setUserConfig(this); } catch (Exception e) { host.getLogger().error(sm.getString("userConfig.database"), e); return; } // Deploy the web application (if any) for each defined user Enumeration users = database.getUsers(); while (users.hasMoreElements()) { String user = (String) users.nextElement(); String home = database.getHome(user); deploy(user, home); } }
/** * Initialize our set of users and home directories. */ private void init() { String homeBase = userConfig.getHomeBase(); File homeBaseDir = new File(homeBase); if (!homeBaseDir.exists() || !homeBaseDir.isDirectory()) return; String homeBaseFiles[] = homeBaseDir.list(); for (int i = 0; i < homeBaseFiles.length; i++) { File homeDir = new File(homeBaseDir, homeBaseFiles[i]); if (!homeDir.isDirectory() || !homeDir.canRead()) continue; homes.put(homeBaseFiles[i], homeDir.toString()); } }