<font size=2 face="sans-serif">+1 on creating a separate interface. If
ManagedContext is not a context, I agree with Martin to give it a different
name. How about ManagableState etc?</font>
<br>
<br><font size=2 face="sans-serif">Many thanks,<br>
Emily<br>
===========================<br>
Emily Jiang<br>
WebSphere Application Server, CDI Development Lead</font>
<br><font size=2 face="sans-serif">&nbsp;<br>
MP 211, DE3A20, Winchester, Hampshire, England, SO21 2JN<br>
Phone: &nbsp;+44 (0)1962 816278 &nbsp;Internal: 246278<br>
<br>
Email: emijiang@uk.ibm.com <br>
Lotus Notes: Emily Jiang/UK/IBM@IBMGB<br>
</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">Martin Kouba &lt;mkouba@redhat.com&gt;</font>
<br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">cdi-dev@lists.jboss.org,
</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">19/07/2016 08:28</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [cdi-dev]
Hierarchy of ManageableContext and Context</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">cdi-dev-bounces@lists.jboss.org</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Hi John,<br>
<br>
I don't see a problem if we introduce a ManageableContext interface <br>
(with activate/deactivate) and a custom context implements it. In other
<br>
words, I don't think it has to be used only for built-in contexts.<br>
<br>
Also the context definition is clear (6.2. The Context interface) and <br>
again, if these are two different things then we should not call it a <br>
context at all [1].<br>
<br>
Martin<br>
<br>
[1]<br>
</font></tt><a href="https://github.com/cdi-spec/cdi/pull/296#issuecomment-229942823"><tt><font size=2>https://github.com/cdi-spec/cdi/pull/296#issuecomment-229942823</font></tt></a><tt><font size=2><br>
<br>
<br>
Dne 18.7.2016 v 13:19 John D. Ament napsal(a):<br>
&gt; All,<br>
&gt;<br>
&gt; I'm starting a discussion thread outside of the PR to avoid folks
on the<br>
&gt; EG not receiving github notifications. &nbsp;I want to drive to get
the<br>
&gt; opinions of the broader EG and use this as feedback on whether or
not we<br>
&gt; change the hierarchy.<br>
&gt;<br>
&gt; I've been against having ManageableContext (MC) extend<br>
&gt; Context/AlterableContext (AC). &nbsp;There's a few reasons. &nbsp;First,<br>
&gt; semantically I can register a context, but I shouldn't be able to<br>
&gt; register a MC. &nbsp;That means from an inheritance standpoint MC
does not<br>
&gt; pass the is-a check on AC. &nbsp;MC may be a composition style, or
nothing at<br>
&gt; all since it may not be associated to any specific thread in the<br>
&gt; future. &nbsp;While we can put in spec verbiage and exceptions to
cover the<br>
&gt; cases where someone does implement MC and try to register it,<br>
&gt; realistically if it's there as a compilation time option, I shouldn't<br>
&gt; get an error if it passes.<br>
&gt;<br>
&gt; I can agree that the bulk of the methods on MC should match AC. &nbsp;That's<br>
&gt; where I introduced a new base class for the two and had MC extend
that.<br>
&gt; The base class provided no behavior, just method signatures. &nbsp;The
second<br>
&gt; key thing for me is in this area. &nbsp;AC is more like a definition,
where<br>
&gt; as MC is a running instance of that definition. &nbsp;Since these
are<br>
&gt; different, it shows that MC doesn't inherit the use-case of the parent
AC.<br>
&gt;<br>
&gt; Third issue I have with extending is that AC is meant to be implemented<br>
&gt; by developers to create custom contexts. &nbsp;Developers aren't intended
to<br>
&gt; implement MC. &nbsp;The container should provide these instances,
since they<br>
&gt; are intended only for built in contexts. &nbsp;We allow developers
who<br>
&gt; implement AC to control their activation, as a result we've already<br>
&gt; provided a means to disassociate a custom AC from any thread.<br>
&gt;<br>
&gt; I want to get others opinions on whether these reasons make sense
and if<br>
&gt; they guide to the same conclusion about not extending AC. &nbsp;For
what its<br>
&gt; worth, I've shown these classes to some of &nbsp;my own developers
to get<br>
&gt; their feedback, who have had to do things like quartz integration
or<br>
&gt; responding to netty requests and activate contexts. &nbsp;The concerns
I<br>
&gt; raise are based on questions they've asked me.<br>
&gt;<br>
&gt; John<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; cdi-dev@lists.jboss.org<br>
&gt; </font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size=2><br>
&gt;<br>
&gt; Note that for all code provided on this list, the provider licenses
the code under the Apache License, Version 2 (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html"><tt><font size=2>http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size=2>).
For all other ideas provided on this list, the provider waives all patent
and other intellectual property rights inherent in such information.<br>
&gt;<br>
_______________________________________________<br>
cdi-dev mailing list<br>
cdi-dev@lists.jboss.org<br>
</font></tt><a href="https://lists.jboss.org/mailman/listinfo/cdi-dev"><tt><font size=2>https://lists.jboss.org/mailman/listinfo/cdi-dev</font></tt></a><tt><font size=2><br>
<br>
Note that for all code provided on this list, the provider licenses the
code under the Apache License, Version 2 (</font></tt><a href="http://www.apache.org/licenses/LICENSE-2.0.html"><tt><font size=2>http://www.apache.org/licenses/LICENSE-2.0.html</font></tt></a><tt><font size=2>).
For all other ideas provided on this list, the provider waives all patent
and other intellectual property rights inherent in such information.<br>
<br>
</font></tt>
<br><font size=2 face="sans-serif"><br>
Unless stated otherwise above:<br>
IBM United Kingdom Limited - Registered in England and Wales with number
741598. <br>
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU<br>
</font>