<!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;">
Re: Thoughts on filesystem action driven hot deployment
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/maxandersen">Max Rydahl Andersen</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/message/594557#594557">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I go on a small trip and this thread goes wild - sorry for being late to the "party".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1) I'm adding the zip scanning Jason mentioned to detect whether the zip is complete. This is the basis for reliable auto-deploy of zipped content.</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Great - makes perfect sense.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote">2) Reliable auto-deploy of exploded content is not possible. As a safety aid I will use the scanning code from 1) to check any nested jars, but that doesn't make it reliable.<br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-;">Okey...not sure if it will worth the hassle/CPU-cycles but worth experimenting with.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>3) If auto-deploy is available for a type of content, a .skipdeploy marker will prevent auto-deploy of a particular file.</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>..particular file or directory, right ?</p><p>btw. I really like this "veto" option <span> ;) </span> Much easier to implement from user/tooling perspective.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote">3) I'm going to add an "auto-deploy" flag to the deployment-scanner element, with legal values "ALL", "ZIPPED", "NONE". Flag controls what types of content auto-deploy behavior is enabled for. Per Jason's statement above, default is "ZIPPED", as "ALL" cannot be made reliable. Configuring "ALL" will result in a WARN message in the server log.<br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-;">Just to be sure I understand this correctly - this means by default AS7</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-;">cp -r foo.war AS7/deployments</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-;">will trigger an deployment of foo.war when it is an archive when the scanner sees the war and it is complete.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-;">it will *not* trigger deployment of foo.war when it is a directory. Correct ?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote">4) For auto-deploy of exploded content, there will be no deployment descriptor file timestamp check as the means of detecting the need to redeploy, as in EE 6 there is no universal requirement for deployment descriptors. And checking the directory timestamp is not valid as it's easy to change content without triggering a change in the directory timestamp. So, with auto-deploy if any file in the deployment changes, the deployment gets redeployed. People who want to change content without triggering redeploy are going to have to use marker files; either leave auto-deploy disabled and use .dodeploy, or enable auto-deploy and use .skipdeploy.<br/></blockquote><p style="min-;">It took me a couple of reads of #3 and #4 to get what this meant but this actually makes perfect sense and gives a good balance </p><p style="min-;">between preventing bad deployments and still have incremental updates of your exploded content.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This basically means the *only* new thing by default is having to do a </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>touch foo.war.dodeploy</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>or the more portable:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>echo > foo.war.dodeploy </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>for exploded directories. Everything else is just as "before" but better <span> ;) </span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i.e. to make it clean its important that if you detect both a complete foo.war and a foo.war.dodeploy the .dodeploy still gets deleted and goes through the transitions; and that there will be a .deployed file no matter what triggered the deploy.</p><blockquote class="jive-quote"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>5) If a scan tries to use auto-deploy for a file and detects incomplete content, the scan will be aborted (i.e. it will be as if no changes were detected.) The next time the scanner runs, it will check again.</p></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Perfect from first read, but i'm still curious how long that consistency check will take for large projects ?</p><p>And should there be a maximum of redeployment attempts to avoid the logs for filling/cpu cycles burning ?</p><p>Maybe have the user made aware of the .dodeploy failing and make it a .deployfailed after some time and thus require a new touch ?</p><p>(should be fine since if user is doing .dodeploy we should assume that the deployment is actually expected to be complete?)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><blockquote class="jive-quote">AFAICT, this is essentially completing what was discussed in Antwerp and detailed a few pages back by Max. Difference is auto-deploy of exploded content will not be default behavior.<br/></blockquote><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Yes, this works for me <span> :) </span>  I basically get all the goodies I wished for.</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/594557#594557">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>