user2404813
user2404813

Reputation: 11

Hot deployment using jetty server

I am using standalone jetty server in my application. I want to do a hot deployment for a jar. When I browsed through net I found the below settings in jetty.xml

<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>

The ContextDeployer will scan the configurationDir directory at intervals of scanInterval seconds for xml descriptors that define contexts.

In my case I have to do a hot deployment for a jar. Using the above configuration how can I specify to hot deploy for a jar file. It is specified that it will look for changes in context files. So to redeploy should we need to make change to the context file ? Please help me in understanding.

Upvotes: 1

Views: 6244

Answers (1)

jesse mcconnell
jesse mcconnell

Reputation: 7182

Your tagging indicates that you are using Jetty 8, but your example references org.mortbay classes which would be coming from Jetty 6 prior to our move to eclipse several years ago.

http://wiki.eclipse.org/Jetty/Feature/Hot_Deployment

The ContextDeployer was replaced with a ContextProvider and a more powerful deployment lifecycle in Jetty 7/8. In Jetty 9 we merged the ContextProvider and WebappProvider into one (with the same deployment lifecycle setup)

http://www.eclipse.org/jetty/documentation/current/configuring-deployment.html

Upvotes: 3

Related Questions