<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    AS7 Patching requirements
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/jiwils">Jimmy Wilson</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/docs/DOC-16822">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><h2 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.7778em; font-weight: bold;">Patches and AS 7</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;">Background / Introduction to AS 7</h5><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ul><li>AS 7 offers 2 startup modes, standalone and domain.</li><li>Standalone is just the App Server instance.</li><li>Domain starts a Process Controller, a Host Controller, and App Server instances.</li><li>The Process Controller is very lightweight and should remain up for long periods of time.<br/>The Process Controller can re-start Host Controllers and App Server instances, it should be so simple that it doesn't ever need to be restarted itself.</li><li>The Host Controller dictates whether this node is a domain 'Master' or 'Slave'.&#160; </li><li>There may be many App Servers.&#160; <span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span></li></ul><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;"><br/>Configuration files</h5><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span>&#160;</p><ul><li>Domain.xml - should be identical on all machines across the domain, but is read only by the single node acting as 'Domain Controller'.</li><li>Host.xml - Unique for each host, this file tells this host if it's the Domain Controller or not.</li></ul><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;"><br/>Startup (Domain mode)</h5><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span>&#160;</p><ul><li>domain.sh starts the Process Controller.</li><li>Process Controller launches Host Controller.&#160; (Might be Domain Controller, might not be).</li><li>Host Controller, with Domain Controller, manage App Server lifecycles.</li><li>The subdirectory /data/content is a working copy of deployed stuff.</li><li>Note:&#160; Domain mode does not currently support exploded directories for deployments.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span>&#160;</p><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;">Application Server</h5><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span>&#160;</p><ul><li>To the app server, all the components are 'services'.</li><li>A Service has two statuses, 'up' and 'down'.</li><li>There is a subsystem API if you want to extend the capabilities of the application server. </li><li>The Getting Started Guide describes several examples included in the source version of AS 7.&#160; These examples show how the App Server's management API can be used to deploy components.&#160; <span style="font-size: 13px;"><strong>When a component is deployed, it causes the current Application Server configuration file (i.e. standalone.xml) to be re-written on the fly.</strong></span></li><li>The App Server is made up of a core and extensions.&#160; The core contains parts like MSC (the service container), module class loading, and core management.&#160; The rest are extensions.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span>&#160;</p><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;">Patching</h5><p><span style="font-size: 10pt;"><br/>We seek to make patching:</span></p><ul><li>Easy to produce</li><li>Easy to audit</li><li>Easy to test</li><li>Easy to deploy</li><li>Easy to roll back (perhaps.&#160; Under discussion)</li><li>Easy to view/understand the patches applied.</li><li>We'd like to establish a patch directory, maybe under 'modules'.&#160; This patch directory would have a sub-directory for each CP or patch that is applied.</li><li>For this to work, we must produce a Patch-tool that will alter the path used to invoke modules.&#160; It must update the path used find classes and put the latest <span style="font-size: 10pt;">patch's .jars ahead of what was there previously.&#160; (The prior .jars may need to be removed, per security requirements.&#160; This is under discussion.)</span><span style="font-size: 10pt; min-height: 8pt; height: 8pt;"> </span></li><li>Patching a domain is more challenging than patching a single App Server instance, as it might involve patching several hosts and app server instances.&#160; A few interesting notes: <ul style="padding-left: 2.25em; font-size: 13px; list-style-type: disc; list-style-position: initial; list-style-image: initial;"><li style="font-size: 10pt;">Only a domain controller can 'push' changes out.</li><li>The domain controller's modules must be at least as current as the latest version on subordinate nodes. <ul style="padding-left: 2.25em; font-size: 13px; list-style-type: disc; list-style-position: initial; list-style-image: initial;"></ul></li></ul></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="font-size: 10pt;">The Patch-tool must use the<span style="font-size: 13px; text-decoration: underline;"> Application Server's management API </span>to deploy patches.&#160; We need to provide some scripting mechanism which will cause it to distribute the artifacts (perhaps to the above described directory structure for patches) and to cause updates to configuration files.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h5 style="padding-top: 10px; padding-bottom: 4px; font-size: 1.2222em; font-weight: bold;">A possible patch-application scenario</h5><p style="font-size: 10pt;">1)&#160; The Patch-tool talks to the Master Domain Controller, asking it for a list of subordinate hosts.<br/>2)&#160; The Patch-tool updates the modules on the MDC with the new artifacts.&#160; This is because the MDC must be at least as current as the newest host.&#160; The MDC is restarted. Repeat Loop for each Host:<br/>3)&#160; Patch-tool prompts the Host to reconnect to the MDC, because it has been bounced.<br/>4)&#160; Patch-tool puts the new modules in place on the Host, restarts the Host.<br/>5)&#160; The Patch-tool translates the configuration DSL into changes:<br/>&#160;&#160;&#160; - Domain level changes<br/>&#160;&#160;&#160; - Host level changes (1 per Host, so the Patch-tool can command Hosts to update, as was done in the loop above)</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-16822">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>