private void checkWebapp(final String webappName) { try { final ContextName cn = new ContextName(webappName); final String name = "Catalina:type=Deployer,host=localhost"; final ObjectName oname = new ObjectName(name); final String[] params = { cn.getName() }; final String[] signature = { "java.lang.String" }; mBeanServer.invoke(oname, "check", params, signature); } catch (Exception e) { //Ignore } }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
private void checkWebapp(final String webappName) { try { final ContextName cn = new ContextName(webappName, true); final String name = "Catalina:type=Deployer,host=localhost"; final ObjectName oname = new ObjectName(name); final String[] params = { cn.getName() }; final String[] signature = { "java.lang.String" }; mBeanServer.invoke(oname, "check", params, signature); } catch (Exception e) { //Ignore } }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
@Override public String getBaseName() { return new ContextName(path, webappVersion).getBaseName(); }
/** * Deploy XML context descriptors. */ protected void deployDescriptors(File configBase, String[] files) { if (files == null) return; for (int i = 0; i < files.length; i++) { File contextXml = new File(configBase, files[i]); if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".xml")) { ContextName cn = new ContextName(files[i]); String name = cn.getName(); if (isServiced(name)) continue; String file = files[i]; deployDescriptor(cn, contextXml, file); } } }
/** * Deploy XML context descriptors. */ protected void deployDescriptors(File configBase, String[] files) { if (files == null) return; for (int i = 0; i < files.length; i++) { File contextXml = new File(configBase, files[i]); if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".xml")) { ContextName cn = new ContextName(files[i]); String name = cn.getName(); if (isServiced(name)) continue; String file = files[i]; deployDescriptor(cn, contextXml, file); } } }
/** * Deploy XML context descriptors. */ protected void deployDescriptors(File configBase, String[] files) { if (files == null) return; for (int i = 0; i < files.length; i++) { File contextXml = new File(configBase, files[i]); if (files[i].toLowerCase(Locale.ENGLISH).endsWith(".xml")) { ContextName cn = new ContextName(files[i]); String name = cn.getName(); if (isServiced(name)) continue; String file = files[i]; deployDescriptor(cn, contextXml, file); } } }
/** * Create an <code>ObjectName</code> for this * <code>Loader</code> object. * * @param domain Domain in which this name is to be created * @param loader The Loader to be named * @return a new object name * @exception MalformedObjectNameException if a name cannot be created */ static ObjectName createObjectName(String domain, Loader loader) throws MalformedObjectNameException { ObjectName name = null; Context context = loader.getContext(); ContextName cn = new ContextName(context.getName(), false); Container host = context.getParent(); name = new ObjectName(domain + ":type=Loader,host=" + host.getName() + ",context=" + cn.getDisplayName()); return name; }
/** * Create an <code>ObjectName</code> for this * <code>Loader</code> object. * * @param domain Domain in which this name is to be created * @param loader The Loader to be named * * @exception MalformedObjectNameException if a name cannot be created */ static ObjectName createObjectName(String domain, Loader loader) throws MalformedObjectNameException { ObjectName name = null; Context context = loader.getContext(); ContextName cn = new ContextName(context.getName()); Container host = context.getParent(); name = new ObjectName(domain + ":type=Loader,host=" + host.getName() + ",context=" + cn.getDisplayName()); return name; }
/** * Create an <code>ObjectName</code> for this * <code>Loader</code> object. * * @param domain Domain in which this name is to be created * @param loader The Loader to be named * @return a new object name * @exception MalformedObjectNameException if a name cannot be created */ static ObjectName createObjectName(String domain, Loader loader) throws MalformedObjectNameException { ObjectName name = null; Context context = loader.getContext(); ContextName cn = new ContextName(context.getName(), false); Container host = context.getParent(); name = new ObjectName(domain + ":type=Loader,host=" + host.getName() + ",context=" + cn.getDisplayName()); return name; }
@Override public void fileRemoved(File removeWar) { try { ContextName cn = new ContextName(removeWar.getName()); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.removeLocal", cn.getName())); remove(cn.getName(), true); } catch (Exception x) { log.error(sm.getString("farmWarDeployer.removeLocalFail"), x); } }
@Override public void fileRemoved(File removeWar) { try { ContextName cn = new ContextName(removeWar.getName()); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.removeLocal", cn.getName())); remove(cn.getName(), true); } catch (Exception x) { log.error(sm.getString("farmWarDeployer.removeLocalFail"), x); } }
@Override public void fileModified(File newWar) { try { File deployWar = new File(getDeployDir(), newWar.getName()); copy(newWar, deployWar); ContextName cn = new ContextName(deployWar.getName()); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.modInstall", cn.getName(), deployWar.getAbsolutePath())); try { remove(cn.getName(), false); } catch (Exception x) { log.error(sm.getString("farmWarDeployer.modRemoveFail"), x); } install(cn.getName(), deployWar); } catch (Exception x) { log.error(sm.getString("farmWarDeployer.modInstallFail"), x); } }
/** * War remove from watchDir * * @see org.apache.catalina.ha.deploy.FileChangeListener#fileRemoved(File) */ @Override public void fileRemoved(File removeWar) { try { ContextName cn = new ContextName(removeWar.getName(), true); if (log.isInfoEnabled()) log.info(sm.getString("farmWarDeployer.removeLocal", cn.getName())); remove(cn.getName(), true); } catch (Exception x) { log.error(sm.getString("farmWarDeployer.removeLocalFail"), x); } }