<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Option 2<br>
<div class="moz-cite-prefix">On 03/24/2015 02:00 PM, John D. Ament
wrote:<br>
</div>
<blockquote
cite="mid:CAOqetn_wThUpYSb_2D+VTBaq3MAd4MVn6FqX9aHa444XkvM9Yg@mail.gmail.com"
type="cite">
<div dir="ltr">All,
<div><br>
</div>
<div>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're
not necessarily going to handle multiple containers right now,
we don'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.</div>
<div><br>
</div>
<div>Option 1 - Subclass CDI. The returned CDI instance when
bootstrapped would return this subclass of CDI that has
shutdown capability. </div>
<div><br>
</div>
<div>Option 2 - Add method to CDI. Add the shutdown method to
CDI directly, and throw an exception if called in an EE
environment.</div>
<div><br>
</div>
<div>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.</div>
<div><br>
</div>
<div>Let us know your thoughts.</div>
<div><br>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>John</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
cdi-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/cdi-dev">https://lists.jboss.org/mailman/listinfo/cdi-dev</a>
Note that for all code provided on this list, the provider licenses the code under the Apache License, Version 2 (<a class="moz-txt-link-freetext" href="http://www.apache.org/licenses/LICENSE-2.0.html">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.</pre>
</blockquote>
<br>
</body>
</html>