<div dir="ltr">in these choices I prefer 2 as well<div><br></div><div>maybe stupid but why not firing an event? evt.fire(new StandaloneContainerShutdown());</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><span style="font-size:small">Romain Manni-Bucau</span><br><a href="https://twitter.com/rmannibucau" target="_blank">@rmannibucau</a> |  <a href="http://rmannibucau.wordpress.com" target="_blank">Blog</a> | <a href="https://github.com/rmannibucau" target="_blank">Github</a> | <a href="https://www.linkedin.com/in/rmannibucau" target="_blank">LinkedIn</a> | <a href="http://www.tomitribe.com" target="_blank">Tomitriber</a></div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">2015-03-26 12:51 GMT+01:00 Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com" target="_blank">pmuir@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think I prefer (2).<br>
<br>
&gt; On 26 Mar 2015, at 10:56, Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt; wrote:<br>
&gt;<br>
&gt; After second thought, option 1 is my favorite. It’ll be easier to dedicate this subclass to SE bootstrap instead of forbidden usage of some methods in CDI (option 2). Concerning option 3, I don’t see the benefit on option 1.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;&gt; Le 24 mars 2015 à 19:00, John D. Ament &lt;<a href="mailto:john.d.ament@gmail.com">john.d.ament@gmail.com</a>&gt; a écrit :<br>
&gt;&gt;<br>
&gt;&gt; All,<br>
&gt;&gt;<br>
&gt;&gt; In discussion today w/ Jozef, we found that the way of shutting down a container in the proposed SE API precluded the notion that multiple containers could be running.  While we&#39;re not necessarily going to handle multiple containers right now, we don&#39;t want to preclude the idea either.  With that said, there were three different approaches though up to handle how to shutdown a launched container.  it obivously would only work with an SE booted container, but part of this does give a pointer in how we may implement initialize.<br>
&gt;&gt;<br>
&gt;&gt; Option 1 - Subclass CDI.  The returned CDI instance when bootstrapped would return this subclass of CDI that has shutdown capability.<br>
&gt;&gt;<br>
&gt;&gt; Option 2 - Add method to CDI.  Add the shutdown method to CDI directly, and throw an exception if called in an EE environment.<br>
&gt;&gt;<br>
&gt;&gt; Option 3 - Return a different object all together when initializing.  Return something else from initialize, e.g. CDIContext, which has a shutdown method when you initialize.  That class would also have a getter for the CDI instance backing it.<br>
&gt;&gt;<br>
&gt;&gt; Let us know your thoughts.<br>
&gt;&gt;<br>
&gt;&gt; Thanks,<br>
&gt;&gt;<br>
&gt;&gt; John<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; cdi-dev mailing list<br>
&gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt;&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;&gt;<br>
&gt;&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). 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>
&gt; _______________________________________________<br>
&gt; cdi-dev mailing list<br>
&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
&gt;<br>
&gt; Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.<br>
<br>
<br>
_______________________________________________<br>
cdi-dev mailing list<br>
<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
<br>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a href="http://www.apache.org/licenses/LICENSE-2.0.html" target="_blank">http://www.apache.org/licenses/LICENSE-2.0.html</a>). For all other ideas provided on this list, the provider waives all patent and other intellectual property rights inherent in such information.</blockquote></div><br></div>