<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Something about the ExecutionContext framework has been bugging me over the past few weeks, so today I took a whack at addressing what I perceived to be the problems. Some of these are outlined in the issue below, but perhaps the biggest problem was in what users/clients saw: the current design seemed to emphasize design/dependency perspective and sacrificed simplicity for the user/client.</div><div><br></div><div>The patch outlined below (and attached to the issue) has the changes I'm proposing. I'm pretty positive about these changes, because I really think it simplifies what users/clients see (including how DNA repositories will be configured). Basically, the existing ExecutionContext interface is changed to a concrete implementation (with default constructor, and methods to create other instances relative to the context), and ExecutionContext now implements the ExecutionContextFactory interface. Also, several implementations were removed, and now there really is just one component (ExecutionContext) that users/clients have to worry about.</div><div><br></div><div>If you have a chance, please review the patch and provide feedback. Note that the patch was created using revision 701 (the current revision as of tonight) as a baseline, so it should be easy to grab the latest and apply the patch.</div><div><br></div><div>Best regards,</div><div><br></div><div>Randall</div><div><br></div><div><br></div><div><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>From: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">"Randall Hauch (JIRA)" <<a href="mailto:jira-events@lists.jboss.org">jira-events@lists.jboss.org</a>></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Date: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica">January 12, 2009 5:40:03 PM CST</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>To: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="mailto:dna-issues@lists.jboss.org">dna-issues@lists.jboss.org</a></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" color="#000000" style="font: 12.0px Helvetica; color: #000000"><b>Subject: </b></font><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><b>[dna-issues] [JBoss JIRA] Updated: (DNA-270) Simplify the ExecutionContext framework</b></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div> </div><div><br> [ <a href="https://jira.jboss.org/jira/browse/DNA-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">https://jira.jboss.org/jira/browse/DNA-270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a> ]<br><br>Randall Hauch updated DNA-270:<br>------------------------------<br><br> Attachment: dna-270-executioncontext.patch<br><br><br>Attached a patch file that has the proposed changes (relative to revision 701), and which results in all tests passing.<br><br><blockquote type="cite">Simplify the ExecutionContext framework<br></blockquote><blockquote type="cite">---------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Key: DNA-270<br></blockquote><blockquote type="cite"> URL: <a href="https://jira.jboss.org/jira/browse/DNA-270">https://jira.jboss.org/jira/browse/DNA-270</a><br></blockquote><blockquote type="cite"> Project: DNA<br></blockquote><blockquote type="cite"> Issue Type: Task<br></blockquote><blockquote type="cite"> Components: API, Connectors, Documentation, Examples, Graph, Sequencers<br></blockquote><blockquote type="cite"> Affects Versions: 0.3<br></blockquote><blockquote type="cite"> Reporter: Randall Hauch<br></blockquote><blockquote type="cite"> Assignee: Randall Hauch<br></blockquote><blockquote type="cite"> Fix For: 0.4<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> Attachments: dna-270-executioncontext.patch<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">The ExecutionContext interface is used throughout the system. It's defined in 'dna-graph', and used to represent the context or environment for executing various activities. There is also ExecutionContextFactory, which is an interface for creating other contexts with different JAAS security contexts (login context or access control contexts). There are also the Basic* implementations of these interfaces, as well as several subclasses (with various implementations).<br></blockquote><blockquote type="cite">The idea of using an interface for this was to simplify the design of the components that uses/took an ExecutionContext, to prevent propagating dependencies, and to allow customization. However, since ExecutionContext is largely just an aggregation of references, there's little need to customize the behavior, and this doesn't really add any other dependencies to the classpath (all implementations of the aggregated components are already in 'dna-graph') and it doesn't expose any implementations through the method signatures. Using interfaces also complicates the usage, since clients have to know about the concrete implementations. This is even more true when they're setting up the DNA services and repositories in 'dna-repository' and 'dna-jcr'.<br></blockquote><blockquote type="cite">So, consider changing this interface to a concrete class, with methods that make it easy to create instances as well as instances with custom components (e.g., a new context that is the same as 'this' but with a supplied NamespaceRegistry implementation).<br></blockquote><blockquote type="cite">This will change the public API, but this should be acceptable given that we're not yet at 1.0 (and this really improves both the client code, and doesn't really change extension implementations).<br></blockquote><br>-- <br>This message is automatically generated by JIRA.<br>-<br>If you think it was sent incorrectly contact one of the administrators: <a href="https://jira.jboss.org/jira/secure/Administrators.jspa">https://jira.jboss.org/jira/secure/Administrators.jspa</a><br>-<br>For more information on JIRA, see: <a href="http://www.atlassian.com/software/jira">http://www.atlassian.com/software/jira</a><br><br><br>_______________________________________________<br>dna-issues mailing list<br><a href="mailto:dna-issues@lists.jboss.org">dna-issues@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/dna-issues">https://lists.jboss.org/mailman/listinfo/dna-issues</a><br></div></blockquote></div><br></body></html>