<document>
<header>
<product>resin</product>
<title>Packaging/Deployment</title>
<description>
<p>To deploy to a production server a web application is
packaged and then deployed.
</p>
</description>
</header>

<body>
<section title="Deploying to a live server without interruption">
<p>It may be possible to deploy a web application to a live server
without interruption to service if certain conditions are met.</p>

<ol>
  <li>The session objects for your users are being persisted.
  <li>The usage of session scoped objects between the old version and the new is compatible.
  <li>The usage of application scoped objects between the old version and the new is compatible.
  <li>Database schema changes are not required.
</ol>

<p>Resin allows you to have a backup instance running.  The idea is that
this backup instance of Resin takes over if your primary Resin
instance goes down.</p>

<p>If you are using a load balancer to distribute your load to multiple
primary servers, each primary server has a backup server.</p>

<p>You can use this feature to deploy to a live server without
interruption of service.</p>

<ol>
<li>shutdown primary server(s) (backup server(s) takes over)

<li>deploy new war to primary server(s)

<li>start primary server(s).  As soon as the primary server starts,
the user will be using the new version of the application.
    
<li>deploy new war to backup server(s)
</ol>

</section>

<section name="precompile-jsp" title="JSP Precompilation">

See <a href="doc|jsp|compile">JSP/Compilation.</a>
</section>

</body>
</document>
