优化启动时间后,Eclipse上的Tomcat不会停止

时间:2019-05-12 23:14:18

标签: eclipse tomcat

我积极优化了server.xml以缩短启动时间:

<?xml version="1.0" encoding="UTF-8"?>
<Server port="8005" shutdown="SHUTDOWN">

    <Service name="Catalina">

        <Connector connectionTimeout="20000" port="80"
            protocol="HTTP/1.1" redirectPort="8443" />

        <Engine defaultHost="localhost" name="Catalina">

            <Host appBase="webapps" autoDeploy="true" name="localhost"
                startStopThreads="4" unpackWARs="true">

                <Context docBase="myapp1" path="/app1"
                    reloadable="true"
                    source="org.eclipse.jst.jee.server:myapp1" />
                <Context docBase="myapp2" path="/app2"
                    reloadable="true"
                    source="org.eclipse.jst.jee.server:myapp2" />

[...] closing tags ommitted

context.xml

<?xml version="1.0" encoding="UTF-8"?>
<Context containerSciFilter="NONE">

    <JarScanner>
        <JarScanFilter
            pluggabilityScan="" tldScan="" defaultTldScan="false"/>
    </JarScanner>

    <Manager pathname="" />

    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

</Context>

我的应用程序过去需要60秒钟以上才能启动,现在只需21秒即可启动。

现在的问题是Eclipse不再能够关闭tomcat。

我以为这就是我所需要的<Server port="8005" shutdown="SHUTDOWN">

但是显然我还缺少其他东西。会是什么?

0 个答案:

没有答案