首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >热部署到Jetty的最佳解决方案是什么?

热部署到Jetty的最佳解决方案是什么?
EN

Stack Overflow用户
提问于 2009-02-18 12:22:59
回答 3查看 11.3K关注 0票数 7

我有一个运行在jetty上的web应用程序。继续构建都是基于hudson构建的。我想从hudson按需进行热部署。

我找到了cargo插件,它应该能够做到这一点,但是cargo的web没有显示任何完整的示例-对于远程jetty服务器-可能我错过了它?

你有什么建议?你还有其他更好的解决方案吗?

谢谢,

维泰克

EN

回答 3

Stack Overflow用户

发布于 2009-03-10 16:17:21

Cargo的documentation表明可以通过maven 2部署到jetty。

这是configuration

我猜你试过了吧?问题出在哪里?

票数 3
EN

Stack Overflow用户

发布于 2009-11-09 13:49:14

Jetty :可以独立运行:只需远程复制您构建的war即可。独立的Jetty实例可以运行独立的端口。

Yml :例如

代码语言:javascript
运行
复制
<Set name="ThreadPool">
  -->
  <New class="org.mortbay.thread.QueuedThreadPool">
    <Set name="minThreads">10</Set>
    <Set name="maxThreads">50</Set>
    <Set name="lowThreads">5</Set>
    <Set name="SpawnOrShrinkAt">2</Set>
  </New>

</Set>




<Call name="addConnector">
  <Arg>
      <New class="org.mortbay.jetty.nio.SelectChannelConnector">
        <Set name="host"><SystemProperty name="jetty.host" default="0.0.0.0" /></Set>
        <Set name="port"><SystemProperty name="jetty.port" default="8880"/></Set>
        <Set name="maxIdleTime">300000</Set>
        <Set name="Acceptors">2</Set>
        <Set name="statsOn">false</Set>
        <Set name="confidentialPort">8441</Set>
        <Set name="lowResourcesConnections">20000</Set>
        <Set name="lowResourcesMaxIdleTime">5000</Set>
      </New>
  </Arg>
</Call>

<Set name="handler">
  <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
    <Set name="handlers">
     <Array type="org.mortbay.jetty.Handler">
       <Item>
         <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
       </Item>
       <Item>
         <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
       </Item>
       <Item>
         <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
       </Item>
     </Array>
    </Set>
  </New>
</Set>

<Call name="addLifeCycle">
  <Arg>
    <New class="org.mortbay.jetty.deployer.ContextDeployer">
      <Set name="contexts"><Ref id="Contexts"/></Set>
      <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts/</Set>
      <Set name="scanInterval">1</Set>
    </New>
  </Arg>
</Call>

<Set name="UserRealms">
  <Array type="org.mortbay.jetty.security.UserRealm">
    <Item>
      <New class="org.mortbay.jetty.security.HashUserRealm">
        <Set name="name">Test Realm</Set>
        <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
        <Set name="refreshInterval">0</Set>
      </New>
    </Item>
  </Array>
</Set>

<Ref id="RequestLog">
  <Set name="requestLog">
    <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
      <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
      <Set name="filenameDateFormat">yyyy_MM_dd</Set>
      <Set name="retainDays">90</Set>
      <Set name="append">true</Set>
      <Set name="extended">true</Set>
      <Set name="logCookies">false</Set>
      <Set name="LogTimeZone">GMT</Set>
    </New>
  </Set>
</Ref>

<Set name="stopAtShutdown">true</Set>
<Set name="sendServerVersion">true</Set>
<Set name="sendDateHeader">true</Set>
<Set name="gracefulShutdown">1000</Set>

票数 0
EN

Stack Overflow用户

发布于 2011-03-31 01:08:23

对于使用Windows的用户,如果遇到文件锁定错误,请访问:

http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows

Windows锁定Jetty加载到内存中的文件。上面的链接将向您展示如何防止这种情况。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/560836

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档