本文整理汇总了Java中org.apache.catalina.LifecycleState.DESTROYED属性的典型用法代码示例。如果您正苦于以下问题:Java LifecycleState.DESTROYED属性的具体用法?Java LifecycleState.DESTROYED怎么用?Java LifecycleState.DESTROYED使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.catalina.LifecycleState
的用法示例。
在下文中一共展示了LifecycleState.DESTROYED属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: tearDown
@After
@Override
public void tearDown() throws Exception {
try {
// Some tests may call tomcat.destroy(), some tests may just call
// tomcat.stop(), some not call either method. Make sure that stop()
// & destroy() are called as necessary.
if (tomcat.server != null
&& tomcat.server.getState() != LifecycleState.DESTROYED) {
if (tomcat.server.getState() != LifecycleState.STOPPED) {
tomcat.stop();
}
tomcat.destroy();
}
} finally {
super.tearDown();
}
}
示例2: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (testTomcat.getServer() != null && testTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (testTomcat.getServer().getState() != LifecycleState.STOPPED) {
testTomcat.stop();
}
testTomcat.destroy();
}
}
示例3: dismantle
/**
* Dismantle Tomcat.
*/
@After
public void dismantle() {
try {
if (testTomcat.getServer() != null
&& testTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (testTomcat.getServer().getState() != LifecycleState.STOPPED) {
testTomcat.stop();
}
testTomcat.destroy();
}
} catch (LifecycleException e) {
System.out.println("Exception shutting down testing Tomcat: " + e.getMessage());
}
}
示例4: dismantle
/**
* Dismantle Tomcat with index.
* @param index The tomcat index.
*/
public void dismantle(int index) {
try {
if (tomcats[index].getServer() != null
&& tomcats[index].getServer().getState() != LifecycleState.DESTROYED) {
if (tomcats[index].getServer().getState() != LifecycleState.STOPPED) {
tomcats[index].stop();
}
tomcats[index].destroy();
}
} catch (LifecycleException e) {
System.out.println("Exception shutting down Testing Tomcat (this may happen a lot): " + e.getMessage());
}
}
示例5: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (storeTomcat.getServer() != null && storeTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (storeTomcat.getServer().getState() != LifecycleState.STOPPED) {
storeTomcat.stop();
}
storeTomcat.destroy();
}
}
示例6: dismantle
/**
* Dismantles the embedded Tomcat.
* @throws Throwable Throws uncaught throwables for test to fail.
*/
@After
public void dismantle() throws Throwable {
if (registryTomcat.getServer() != null && registryTomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (registryTomcat.getServer().getState() != LifecycleState.STOPPED) {
registryTomcat.stop();
}
registryTomcat.destroy();
}
Registry.getRegistryInstance().getHeartbeatMap().clear();
Registry.getRegistryInstance().getMap().clear();
}
示例7: shutDownTomcat
public static void shutDownTomcat() throws LifecycleException {
if (tomcat.getServer() != null
&& tomcat.getServer().getState() != LifecycleState.DESTROYED) {
if (tomcat.getServer().getState() != LifecycleState.STOPPED) {
tomcat.stop();
}
tomcat.destroy();
}
}