[cdi-dev] Shutting down CDI Instances (John D. Ament)

Werner Keil werner.keil at gmail.com
Wed Mar 25 05:04:21 EDT 2015


All,

Especially if it was only relevant to some "profile" of CDI or environment
like SE, I'd say
+1 for Option 1.

It sounds more modular to me, e.g. this sub-class may only appear in a
certain module of CDI 2 and above (even more vital when you think SE 9+ and
Jigsaw;-)

Cheers,

Werner

On Wed, Mar 25, 2015 at 7:14 AM, <cdi-dev-request at lists.jboss.org> wrote:

> Send cdi-dev mailing list submissions to
>         cdi-dev at lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.jboss.org/mailman/listinfo/cdi-dev
> or, via email, send a message with subject or body 'help' to
>         cdi-dev-request at lists.jboss.org
>
> You can reach the person managing the list at
>         cdi-dev-owner at lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of cdi-dev digest..."
>
>
> Today's Topics:
>
>    1. JavaLand (Thorben Janssen)
>    2. Re: JavaLand (Mark Struberg)
>    3. Today's meeting --> Focus on Java SE (Antoine Sabot-Durand)
>    4. Shutting down CDI Instances (John D. Ament)
>    5. Some more thoughts on async events (Jos? Paumard)
>    6. Re: Some more thoughts on async events (Mark Struberg)
>    7. Re: Some more thoughts on async events (Antoine Sabot-Durand)
>
>
> ----------------------------------------------------------------------
>
> Message: 4
> Date: Tue, 24 Mar 2015 18:00:00 +0000
> From: "John D. Ament" <john.d.ament at gmail.com>
> Subject: [cdi-dev] Shutting down CDI Instances
> To: "cdi-dev at lists.jboss.org" <cdi-dev at lists.jboss.org>
> Message-ID:
>         <
> CAOqetn_wThUpYSb_2D+VTBaq3MAd4MVn6FqX9aHa444XkvM9Yg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> All,
>
> 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.
>
> Option 1 - Subclass CDI.  The returned CDI instance when bootstrapped would
> return this subclass of CDI that has shutdown capability.
>
> Option 2 - Add method to CDI.  Add the shutdown method to CDI directly, and
> throw an exception if called in an EE environment.
>
> 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.
>
> Let us know your thoughts.
>
> Thanks,
>
> John
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.jboss.org/pipermail/cdi-dev/attachments/20150324/096f96d5/attachment-0001.html
>
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev
>
> Note that for all code provided on this list, the provider licenses the
> code under the Apache License, Version 2 (
> http://www.apache.org/licenses/LICENSE-2.0.html).  For all other ideas
> provided on this list, the provider waives all patent and other
> intellectual property rights inherent in such information.
>
> End of cdi-dev Digest, Vol 52, Issue 82
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/cdi-dev/attachments/20150325/8c2e5e08/attachment.html 


More information about the cdi-dev mailing list