<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>I have done up a quick and dirty prototype of my #2 approach at </div><div><br></div><div><a href="https://github.com/stuartwdouglas/jboss-as/compare/AS7-4296">https://github.com/stuartwdouglas/jboss-as/compare/AS7-4296</a></div><div><br></div><div>The basic usage can be seen in ContentOverrideTestCase: </div><div><br></div><div><a href="https://github.com/stuartwdouglas/jboss-as/blob/01e2cdb24e34a898643682da7b284d8b4885bf98/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/deployment/contentoverride/ContentOverrideTestCase.java">https://github.com/stuartwdouglas/jboss-as/blob/01e2cdb24e34a898643682da7b284d8b4885bf98/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/deployment/contentoverride/ContentOverrideTestCase.java</a></div><div><br></div><div>(it does not work in domain mode, and basically is the bare minimum required to get it functional)</div><div><br></div><div>This approach actually works with any content, not just deployment descriptors, so for example you could use it to replace an image or a web page as well.</div><div><br></div><div>Stuart </div><div><br></div><div><br></div><div><br></div><br><div><div>On 06/04/2012, at 1:45 AM, Jason T. Greene wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On 4/5/12 3:52 AM, Chris Kriel wrote:<br><blockquote type="cite">Are you sure that this truly reflects what most users want? Are you not just<br></blockquote><blockquote type="cite">adding a lot of complexity to cater for the whim of a small group of users?<br></blockquote><blockquote type="cite"><blockquote type="cite">From what I can gather from this thread, the motivation for these overrides<br></blockquote></blockquote><blockquote type="cite">are rather thin. It is based on some users having a "policy" to not<br></blockquote><blockquote type="cite">break-open deployment artefacts. How overriding is better or safer that<br></blockquote><blockquote type="cite">"breaking open" escapes me at the moment.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Very much part of the EJB specification is the definition of roles and<br></blockquote><blockquote type="cite">responsibilities. As you know, it describes a definite role for composing<br></blockquote><blockquote type="cite">(and by implication "breaking-open" to recompose) artefacts. If your<br></blockquote><blockquote type="cite">configuration is too dynamic for this approach then it is a matter of<br></blockquote><blockquote type="cite">application design to pick this up from elsewhere (DB or properties file).<br></blockquote><br>I certainly see where you are coming from. In fact I do agree that this <br>feature could be used as a crutch over better ways to solve the problem.<br><br>There are, however, legitimate reasons / use-cases for an override. Here <br>is a few in no particular order:<br><br>1. Third-party application - Some third party applications need <br>customizations for either the environment (ip addresses, etc), or in <br>some cases running on JBoss AS (the case app was primarily tailored to <br>another app server). If you followed Stuarts proposal #2 of deploying <br>the override first, then updating a newer thirdparty app is a bit <br>simpler, you just deploy the new version, and the same overrides take effect<br><br>2. Staging / Dev / Prod deltas - A good example is @Alternative in CDI, <br>you specify which set of beans you get in beans.xml Another example is <br>that applications can now specify environmental values in annotations <br>(e.g.in EE6 you can now specify @DataSourceDefinition with a URL and a <br>user/pass). Having the ability to provide a per-environment DD lets you <br>override those values. (Another thing we are looking at doing is <br>supporting sys props in deployment descriptors as a vendor extension, <br>which offers another way to skin this cat).<br><br>3. Geographic/Region deltas - Very similar to 2 You might want to add <br>certain values like "distinct-name" (used by EJB remote invocation to <br>differentiate connections)<br><br>-- <br>Jason T. Greene<br>JBoss AS Lead / EAP Platform Architect<br>JBoss, a division of Red Hat<br>_______________________________________________<br>jboss-as7-dev mailing list<br><a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/jboss-as7-dev<br></div></blockquote></div><br></body></html>