本文整理了Java中org.apache.catalina.Context.stop()
方法的一些代码示例,展示了Context.stop()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.stop()
方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:stop
暂无
代码示例来源:origin: psi-probe/psi-probe
@Override
public void stop(String name) throws Exception {
Context ctx = findContext(name);
if (ctx != null) {
ctx.stop();
}
}
代码示例来源:origin: stackoverflow.com
public static void main(String args[]) {
startReport();
Timer timer = metricRegistry.timer("computePi");
Timer.Context context = timer.time();
try {
computePi();
} finally {
context.stop();
}
}
代码示例来源:origin: com.github.skjolber.mockito-rest-spring/tomcat
private void stop(Context context) throws LifecycleException, InterruptedException {
context.stop();
long deadline = System.currentTimeMillis() + 10000;
do {
switch(context.getState()) {
case STOPPED:
case DESTROYING:
case DESTROYED:
case FAILED:
return;
default : {
}
}
Thread.sleep(10);
} while(deadline > System.currentTimeMillis());
}
代码示例来源:origin: org.apache.openejb/tomee-webservices
@Override
public HttpListener removeListener(final String completePath) {
String path = completePath;
if (path == null) {
return listeners.get(path);
}
// assure context root with a leading slash
if (!path.startsWith("/") && !path.startsWith("http://") && !path.startsWith("https://")) {
path = "/" + path;
}
if (TomcatHelper.isTomcat7() && TomcatHelper.isStopping() && listeners.containsKey(path)) {
return listeners.get(path);
}
Context context = contexts.remove(path);
try {
context.stop();
context.destroy();
} catch (Exception e) {
throw new TomEERuntimeException(e);
}
Host host = (Host) context.getParent();
host.removeChild(context);
return listeners.remove(completePath);
}
}
代码示例来源:origin: org.apache.openejb/tomee-webservices
public void removeWsContainer(String path) {
if (path == null) return;
// assure context root with a leading slash
if (!path.startsWith("/")) path = "/" + path;
if (TomcatHelper.isTomcat7() && TomcatHelper.isStopping()) {
return;
}
Context context = webserviceContexts.remove(path);
if (WEBSERVICE_OLDCONTEXT_ACTIVE) {
try {
context.destroy();
context.stop();
} catch (Exception e) {
throw new TomEERuntimeException(e);
}
Host host = (Host) context.getParent();
host.removeChild(context);
} // else let tomcat manages its context
}
代码示例来源:origin: codefollower/Tomcat-Research
log.debug(sm.getString("farmWarDeployer.undeployLocal",
contextName));
context.stop();
String baseName = context.getBaseName();
File war = new File(host.getAppBaseFile(), baseName + ".war");
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
log.debug(sm.getString("farmWarDeployer.undeployLocal",
contextName));
context.stop();
String baseName = context.getBaseName();
File war = new File(getAppBase(), baseName + ".war");
代码示例来源:origin: org.apache.tomcat/tomcat-catalina-ha
log.debug(sm.getString("farmWarDeployer.undeployLocal",
contextName));
context.stop();
String baseName = context.getBaseName();
File war = new File(host.getAppBaseFile(), baseName + ".war");
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: codefollower/Tomcat-Research
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
return;
context.stop();
writer.println(smClient.getString(
"managerServlet.stopped", displayPath));
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
try {
context.stop();
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
try {
context.stop();
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
try {
context.stop();
} catch (Throwable t) {
ExceptionUtils.handleThrowable(t);
代码示例来源:origin: org.wso2.carbon.commons/org.wso2.carbon.url.mapper.clustermessage
public static void removeVirtualHost(String hostName) {
Engine engine = DataHolder.getInstance().getCarbonTomcatService().getTomcat().getEngine();
Host host = (Host) engine.findChild(hostName);
Context context = (Context) host.findChild("/");
try {
if (host.getState().isAvailable()) {
if (context != null && context.getAvailable()) {
context.setRealm(null);
context.stop();
context.destroy();
log.info("Unloaded webapp from the host: " + host
+ " as the context of: " + context);
}
host.removeChild(context);
host.setRealm(null);
host.stop();
host.destroy();
engine.removeChild(host);
}
}catch (LifecycleException e) {
log.error("error while removing host from tomcat", e);
}
URLMappingHolder.getInstance().removeUrlMappingMap(
host.getName());
log.info("Unloaded host from the engine: " + host);
}
public static Host addHostToEngine(String hostName) {
内容来源于网络,如有侵权,请联系作者删除!