JBoss EAP 5.1 でコンテナーを停止できません。container.stop を実行すると、ポートの状態は次のようになります。
TCP 127.0.0.1:2927 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2928 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2929 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2930 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2931 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2932 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2933 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2934 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2935 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2936 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2937 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2938 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2939 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2940 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2941 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2942 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2943 127.0.0.1:8080 TIME_WAIT
TCP 127.0.0.1:2944 127.0.0.1:8080 TIME_WAIT
次の例外があります。
Caused by: org.codehaus.cargo.container.ContainerException: Server port 8080 did not shutdown within the timeout period [120000]
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:390)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:301)
at org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.waitForCompletion(AbstractJBossInstalledLocalContainer.java:154)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:214)
... 33 more
org.codehaus.cargo.container.ContainerException: Server port 8080 did not shutdown within the timeout period [120000]
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:390)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.waitForPortShutdown(AbstractLocalContainer.java:301)
at org.codehaus.cargo.container.jboss.internal.AbstractJBossInstalledLocalContainer.waitForCompletion(AbstractJBossInstalledLocalContainer.java:154)
at org.codehaus.cargo.container.spi.AbstractLocalContainer.stop(AbstractLocalContainer.java:214)
at jp.co.nri.kinshasa.util.server.JBossServerImpl.stopContainer(JBossServerImpl.java:151)
私のコードは、JBoss51xInstalledLocalContainer を使用するようなものです。
private void prepareJBoss() {
ConfigurationFactory configurationFactory = new DefaultConfigurationFactory();
localConfiguration = (StandaloneLocalConfiguration) configurationFactory
.createConfiguration("jboss51x", ContainerType.INSTALLED,
ConfigurationType.STANDALONE, WORK_HOME);
localConfiguration.setProperty(JBossPropertySet.JBOSS_USER, "admin");
localConfiguration
.setProperty(JBossPropertySet.JBOSS_PASSWORD, "admin");
localConfiguration.setProperty(GeneralPropertySet.JVMARGS,
"-Xms512m -Xmx512m");
}
private void startContainer() {
container = new JBoss51xInstalledLocalContainer(localConfiguration);
container.setHome(JBOSS_HOME);
container.setExtraClasspath(new String[] {
PROJECT_PATH + "/target/external/kss/apl_conf",
PROJECT_PATH + "/target/external/kss/kiban_conf" });
container.start();
}