<div dir="ltr">How did it come here in the first place is there some automated mirror from the JIRA tickets?;-)<div class="gmail_extra">I  should have a JIRA user from Agorava, so I may use it there.<span lang="EN-GB"><div style="font-family:arial,helvetica,sans-serif"><br></div></span>
<br><div class="gmail_quote">On Fri, Feb 6, 2015 at 1:33 PM,  <span dir="ltr">&lt;<a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Send cdi-dev mailing list submissions to<br>
        <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:cdi-dev-request@lists.jboss.org">cdi-dev-request@lists.jboss.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:cdi-dev-owner@lists.jboss.org">cdi-dev-owner@lists.jboss.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of cdi-dev digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: [JBoss JIRA] (CDI-504) have a standard CDI annotation<br>
      like (Antoine Sabot-Durand)<br>
   2. Re: [JBoss JIRA] (CDI-504) have a standard CDI annotation<br>
      like (Werner Keil)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 6 Feb 2015 05:33:06 -0700 (MST)<br>
From: Antoine Sabot-Durand &lt;<a href="mailto:antoine@sabot-durand.net">antoine@sabot-durand.net</a>&gt;<br>
Subject: Re: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
        annotation      like<br>
To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
Message-ID: &lt;<a href="mailto:1423225986023-5710923.post@n5.nabble.com">1423225986023-5710923.post@n5.nabble.com</a>&gt;<br>
Content-Type: text/plain; charset=us-ascii<br>
<br>
Werner, It would be better to answer Jira discussion on Jira to keep<br>
information on the ticket.<br>
<br>
Antoine<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://cdi-development-mailing-list.1064426.n5.nabble.com/Re-JBoss-JIRA-CDI-504-have-a-standard-CDI-annotation-like-tp5710919p5710923.html" target="_blank">http://cdi-development-mailing-list.1064426.n5.nabble.com/Re-JBoss-JIRA-CDI-504-have-a-standard-CDI-annotation-like-tp5710919p5710923.html</a><br>
Sent from the CDI Development mailing list mailing list archive at Nabble.com.<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 6 Feb 2015 13:33:36 +0100<br>
From: Werner Keil &lt;<a href="mailto:werner.keil@gmail.com">werner.keil@gmail.com</a>&gt;<br>
Subject: Re: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
        annotation      like<br>
To: arjan tijms &lt;<a href="mailto:arjan.tijms@gmail.com">arjan.tijms@gmail.com</a>&gt;<br>
Cc: cdi-dev &lt;<a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a>&gt;<br>
Message-ID:<br>
        &lt;<a href="mailto:CAAGawe3_v086e6LYG8mh6burZOm%2BP%2BFyS4XS2BJ-TrfA%2BELvXQ@mail.gmail.com">CAAGawe3_v086e6LYG8mh6burZOm+P+FyS4XS2BJ-TrfA+ELvXQ@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
If DeltaSpike Configuration already covered everything there would have<br>
been no need for Tamaya;-)<br>
<br>
On Fri, Feb 6, 2015 at 1:23 PM, arjan tijms &lt;<a href="mailto:arjan.tijms@gmail.com">arjan.tijms@gmail.com</a>&gt; wrote:<br>
<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Fri, Feb 6, 2015 at 11:22 AM, Werner Keil &lt;<a href="mailto:werner.keil@gmail.com">werner.keil@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt; but so far JCP officials first and foremost<br>
&gt; &gt; Oracle saw either no need or no resources to do this.<br>
&gt;<br>
&gt; I remember some other issues being on the table, like Java SE vs Java<br>
&gt; EE and &quot;configuring the runtime&quot; vs &quot;injecting/providing values to the<br>
&gt; app&quot;.<br>
&gt;<br>
&gt; DeltaSpike Configuration is really great, but it&#39;s a value provider.<br>
&gt; It doesn&#39;t let you swap out or overlay deployment descriptors etc.<br>
&gt;<br>
&gt; Kind regards,<br>
&gt; Arjan Tijms<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; Apache Tamaya was a logical result. If that could become a blue-print or<br>
&gt; &gt; initial contribution of a future JSR, let&#39;s see, maybe for EE 9. It uses<br>
&gt; &gt; other Apache projects like DeltaSpike where applicable, but may also<br>
&gt; define<br>
&gt; &gt; such annotations and types of its own, so I suggest you also share your<br>
&gt; &gt; ideas on a Tamaya mailing list or JIRA:<br>
&gt; &gt; <a href="http://tamaya.incubator.apache.org/index.html" target="_blank">http://tamaya.incubator.apache.org/index.html</a><br>
&gt; &gt;<br>
&gt; &gt; On Fri, Feb 6, 2015 at 11:02 AM, &lt;<a href="mailto:cdi-dev-request@lists.jboss.org">cdi-dev-request@lists.jboss.org</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Send cdi-dev mailing list submissions to<br>
&gt; &gt;&gt;         <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>
&gt; &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;&gt; or, via email, send a message with subject or body &#39;help&#39; to<br>
&gt; &gt;&gt;         <a href="mailto:cdi-dev-request@lists.jboss.org">cdi-dev-request@lists.jboss.org</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; You can reach the person managing the list at<br>
&gt; &gt;&gt;         <a href="mailto:cdi-dev-owner@lists.jboss.org">cdi-dev-owner@lists.jboss.org</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; When replying, please edit your Subject line so it is more specific<br>
&gt; &gt;&gt; than &quot;Re: Contents of cdi-dev digest...&quot;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Today&#39;s Topics:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;    1. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (James Strachan (JIRA))<br>
&gt; &gt;&gt;    2. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (Martin Kouba (JIRA))<br>
&gt; &gt;&gt;    3. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (John Ament (JIRA))<br>
&gt; &gt;&gt;    4. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (James Strachan (JIRA))<br>
&gt; &gt;&gt;    5. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (James Strachan (JIRA))<br>
&gt; &gt;&gt;    6. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (James Strachan (JIRA))<br>
&gt; &gt;&gt;    7. [JBoss JIRA] (CDI-504) have a standard CDI annotation like<br>
&gt; &gt;&gt;       @ConfigProperty from deltapsike (Antoine Sabot-Durand (JIRA))<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ----------------------------------------------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 1<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 05:01:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;James Strachan (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.44616.1423130509034@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; James Strachan created CDI-504:<br>
&gt; &gt;&gt; ----------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;              Summary: have a standard CDI annotation like<br>
&gt; @ConfigProperty<br>
&gt; &gt;&gt; from deltapsike<br>
&gt; &gt;&gt;                  Key: CDI-504<br>
&gt; &gt;&gt;                  URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt;              Project: CDI Specification Issues<br>
&gt; &gt;&gt;           Issue Type: Feature Request<br>
&gt; &gt;&gt;             Reporter: James Strachan<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; images<br>
&gt; &gt;&gt; are static and the main way of injecting configuration is via<br>
&gt; environment<br>
&gt; &gt;&gt; variables - so that the same image can be reused but configured at run<br>
&gt; time<br>
&gt; &gt;&gt; with different configuration values. (Changing configuration files<br>
&gt; requires<br>
&gt; &gt;&gt; either different images to be created or using custom volumes which is<br>
&gt; less<br>
&gt; &gt;&gt; ideal in a containerized world).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; provide<br>
&gt; &gt;&gt; a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; the<br>
&gt; &gt;&gt; CDI specification; its one simple annotation.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler annotation<br>
&gt; &gt;&gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; There could be debate on whether env vars or system properties should<br>
&gt; win<br>
&gt; &gt;&gt; if the same name is used for both; in a dockerized world I&#39;d prefer env<br>
&gt; vars<br>
&gt; &gt;&gt; to win but folks can always tinker with their run command to make sure<br>
&gt; they<br>
&gt; &gt;&gt; pass in env vars as system properties to work around this I guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 2<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 10:30:50 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;Martin Kouba (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.45712.1423150250888@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038005#comment-13038005" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038005#comment-13038005</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Martin Kouba commented on CDI-504:<br>
&gt; &gt;&gt; ----------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; What&#39;s wrong with {{java.lang.System.getProperty()}} and<br>
&gt; &gt;&gt; {{java.lang.System.getenv()}}? I mean the main advantage of DS<br>
&gt; Configuration<br>
&gt; &gt;&gt; is IMO the resolution mechanism and the ability to extend the set of<br>
&gt; &gt;&gt; {{ConfigSource}} s. If you only need system properties and env<br>
&gt; variables a<br>
&gt; &gt;&gt; simple producer method and qualifier (or even a simple util method)<br>
&gt; would be<br>
&gt; &gt;&gt; sufficient. In other words I see no reason to standardize this.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 3<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 10:34:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;John Ament (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.45725.1423150489341@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038007#comment-13038007" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038007#comment-13038007</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; John Ament commented on CDI-504:<br>
&gt; &gt;&gt; --------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; A separate config JSR has been proposed previously to address this.<br>
&gt; They<br>
&gt; &gt;&gt; want to see more options before trying to standardize it.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 4<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 10:39:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;James Strachan (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.45741.1423150789541@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; James Strachan commented on CDI-504:<br>
&gt; &gt;&gt; ------------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; @Resource is supported - injecting values from JNDI. I don&#39;t see why<br>
&gt; &gt;&gt; injecting values (with a default value) from the environment isn&#39;t also<br>
&gt; &gt;&gt; supported too. There&#39;s a Java API for JNDI too so folks could look<br>
&gt; stuff up<br>
&gt; &gt;&gt; in JNDI by hand and do the type conversions - but we&#39;ve injection for<br>
&gt; those<br>
&gt; &gt;&gt; values.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Its also much cleaner code and can easily deal generically with type<br>
&gt; &gt;&gt; conversion to long/double/float/date etc.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Compare:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(int bar, ...) {<br>
&gt; &gt;&gt; bar = System.getenv(&quot;FOO&quot;);<br>
&gt; &gt;&gt; if (bar == null) {<br>
&gt; &gt;&gt;    bar = &quot;someDefault&quot;;<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; // now convert to a String with error handling....<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; to just:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(@Environment(&quot;FOO&quot;, &quot;someDefault&quot;) int bar, ...) {<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Also by using an annotation it means its very easy to generate<br>
&gt; &gt;&gt; documentation and tooling. (e.g. using APT you can know what all the<br>
&gt; &gt;&gt; environment variables are used by CDI; either to report on demand or to<br>
&gt; &gt;&gt; generate user documentation).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 5<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 10:49:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;James Strachan (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.45763.1423151389408@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; James Strachan edited comment on CDI-504 at 2/5/15 10:49 AM:<br>
&gt; &gt;&gt; -------------------------------------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; @Resource is supported - injecting values from JNDI. I don&#39;t see why<br>
&gt; &gt;&gt; injecting values (with a default value) from the environment isn&#39;t also<br>
&gt; &gt;&gt; supported too. There&#39;s a Java API for JNDI too so folks could look<br>
&gt; stuff up<br>
&gt; &gt;&gt; in JNDI by hand and do the type conversions - but we&#39;ve injection for<br>
&gt; those<br>
&gt; &gt;&gt; values.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Its also much cleaner code and can easily deal generically with type<br>
&gt; &gt;&gt; conversion to long/double/float/date etc.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Compare:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(int bar, ...) {<br>
&gt; &gt;&gt; bar = System.getenv(&quot;FOO&quot;);<br>
&gt; &gt;&gt; if (bar == null) {<br>
&gt; &gt;&gt;    bar = &quot;someDefault&quot;;<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; // now convert the String to an int with nice error handling and<br>
&gt; &gt;&gt; reporting....<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; to just:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(@Environment(&quot;FOO&quot;, &quot;someDefault&quot;) int bar, ...) {<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Also by using an annotation it means its very easy to generate<br>
&gt; &gt;&gt; documentation and tooling. (e.g. using APT you can know what all the<br>
&gt; &gt;&gt; environment variables are used by CDI; either to report on demand or to<br>
&gt; &gt;&gt; generate user documentation).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; was (Author: jastrachan):<br>
&gt; &gt;&gt; @Resource is supported - injecting values from JNDI. I don&#39;t see why<br>
&gt; &gt;&gt; injecting values (with a default value) from the environment isn&#39;t also<br>
&gt; &gt;&gt; supported too. There&#39;s a Java API for JNDI too so folks could look<br>
&gt; stuff up<br>
&gt; &gt;&gt; in JNDI by hand and do the type conversions - but we&#39;ve injection for<br>
&gt; those<br>
&gt; &gt;&gt; values.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Its also much cleaner code and can easily deal generically with type<br>
&gt; &gt;&gt; conversion to long/double/float/date etc.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Compare:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(int bar, ...) {<br>
&gt; &gt;&gt; bar = System.getenv(&quot;FOO&quot;);<br>
&gt; &gt;&gt; if (bar == null) {<br>
&gt; &gt;&gt;    bar = &quot;someDefault&quot;;<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; // now convert to a String with error handling....<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; to just:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(@Environment(&quot;FOO&quot;, &quot;someDefault&quot;) int bar, ...) {<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Also by using an annotation it means its very easy to generate<br>
&gt; &gt;&gt; documentation and tooling. (e.g. using APT you can know what all the<br>
&gt; &gt;&gt; environment variables are used by CDI; either to report on demand or to<br>
&gt; &gt;&gt; generate user documentation).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 6<br>
&gt; &gt;&gt; Date: Thu, 5 Feb 2015 10:50:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;James Strachan (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.45773.1423151449139@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038012#comment-13038012</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; James Strachan edited comment on CDI-504 at 2/5/15 10:50 AM:<br>
&gt; &gt;&gt; -------------------------------------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; @Resource is supported - injecting values from JNDI. I don&#39;t see why<br>
&gt; &gt;&gt; injecting values (with a default value) from the environment isn&#39;t also<br>
&gt; &gt;&gt; supported too. There&#39;s a Java API for JNDI too so folks could look<br>
&gt; stuff up<br>
&gt; &gt;&gt; in JNDI by hand and do the type conversions - but we&#39;ve injection for<br>
&gt; those<br>
&gt; &gt;&gt; values.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Its also much cleaner code and can easily deal generically with type<br>
&gt; &gt;&gt; conversion to long/double/float/date etc.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Compare:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; int bar;<br>
&gt; &gt;&gt; @Inject Foo() {<br>
&gt; &gt;&gt; barText = System.getenv(&quot;FOO&quot;);<br>
&gt; &gt;&gt; if (barText == null) {<br>
&gt; &gt;&gt;    barText = &quot;someDefault&quot;;<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; // now convert the String to an int with nice error handling and<br>
&gt; &gt;&gt; reporting....<br>
&gt; &gt;&gt; bar = someConvertCode(barText);<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; to just:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(@Environment(&quot;FOO&quot;, &quot;someDefault&quot;) int bar, ...) {<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Note that in the second case, folks could use the constructor explicitly<br>
&gt; &gt;&gt; without being bound to environment variables too; much cleaner, more<br>
&gt; modular<br>
&gt; &gt;&gt; code.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Also by using an annotation it means its very easy to generate<br>
&gt; &gt;&gt; documentation and tooling. (e.g. using APT you can know what all the<br>
&gt; &gt;&gt; environment variables are used by CDI; either to report on demand or to<br>
&gt; &gt;&gt; generate user documentation).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; was (Author: jastrachan):<br>
&gt; &gt;&gt; @Resource is supported - injecting values from JNDI. I don&#39;t see why<br>
&gt; &gt;&gt; injecting values (with a default value) from the environment isn&#39;t also<br>
&gt; &gt;&gt; supported too. There&#39;s a Java API for JNDI too so folks could look<br>
&gt; stuff up<br>
&gt; &gt;&gt; in JNDI by hand and do the type conversions - but we&#39;ve injection for<br>
&gt; those<br>
&gt; &gt;&gt; values.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Its also much cleaner code and can easily deal generically with type<br>
&gt; &gt;&gt; conversion to long/double/float/date etc.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Compare:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(int bar, ...) {<br>
&gt; &gt;&gt; bar = System.getenv(&quot;FOO&quot;);<br>
&gt; &gt;&gt; if (bar == null) {<br>
&gt; &gt;&gt;    bar = &quot;someDefault&quot;;<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; // now convert the String to an int with nice error handling and<br>
&gt; &gt;&gt; reporting....<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; to just:<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt; @Inject Foo(@Environment(&quot;FOO&quot;, &quot;someDefault&quot;) int bar, ...) {<br>
&gt; &gt;&gt; }<br>
&gt; &gt;&gt; {code}<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Also by using an annotation it means its very easy to generate<br>
&gt; &gt;&gt; documentation and tooling. (e.g. using APT you can know what all the<br>
&gt; &gt;&gt; environment variables are used by CDI; either to report on demand or to<br>
&gt; &gt;&gt; generate user documentation).<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Message: 7<br>
&gt; &gt;&gt; Date: Fri, 6 Feb 2015 05:02:49 -0500 (EST)<br>
&gt; &gt;&gt; From: &quot;Antoine Sabot-Durand (JIRA)&quot; &lt;<a href="mailto:issues@jboss.org">issues@jboss.org</a>&gt;<br>
&gt; &gt;&gt; Subject: [cdi-dev] [JBoss JIRA] (CDI-504) have a standard CDI<br>
&gt; &gt;&gt;         annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; To: <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &gt;&gt; Message-ID:<br>
&gt; &gt;&gt;         &lt;JIRA.12562481.1423130482000.47108.1423216969246@Atlassian.JIRA<br>
&gt; &gt;<br>
&gt; &gt;&gt; Content-Type: text/plain; charset=UTF-8<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;     [<br>
&gt; &gt;&gt;<br>
&gt; <a href="https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038271#comment-13038271" target="_blank">https://issues.jboss.org/browse/CDI-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=13038271#comment-13038271</a><br>
&gt; &gt;&gt; ]<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; Antoine Sabot-Durand commented on CDI-504:<br>
&gt; &gt;&gt; ------------------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; James, I don&#39;t get what&#39;s the problem with using DeltaSpike config<br>
&gt; &gt;&gt; solution?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt; have a standard CDI annotation like @ConfigProperty from deltapsike<br>
&gt; &gt;&gt; &gt; -------------------------------------------------------------------<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;                 Key: CDI-504<br>
&gt; &gt;&gt; &gt;                 URL: <a href="https://issues.jboss.org/browse/CDI-504" target="_blank">https://issues.jboss.org/browse/CDI-504</a><br>
&gt; &gt;&gt; &gt;             Project: CDI Specification Issues<br>
&gt; &gt;&gt; &gt;          Issue Type: Feature Request<br>
&gt; &gt;&gt; &gt;            Reporter: James Strachan<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; Docker and containerisation is the new hotness; in the docker world<br>
&gt; &gt;&gt; &gt; images are static and the main way of injecting configuration is via<br>
&gt; &gt;&gt; &gt; environment variables - so that the same image can be reused but<br>
&gt; configured<br>
&gt; &gt;&gt; &gt; at run time with different configuration values. (Changing<br>
&gt; configuration<br>
&gt; &gt;&gt; &gt; files requires either different images to be created or using custom<br>
&gt; volumes<br>
&gt; &gt;&gt; &gt; which is less ideal in a containerized world).<br>
&gt; &gt;&gt; &gt; So IMHO CDI should provide a simple, natural way to allow environment<br>
&gt; &gt;&gt; &gt; variables (or system properties) to be easily injected via CDI.<br>
&gt; &gt;&gt; &gt; Delta Spike as a @ConfigProperty annotation which works very nicely<br>
&gt; &gt;&gt; &gt; <a href="http://deltaspike.apache.org/documentation/configuration.html" target="_blank">http://deltaspike.apache.org/documentation/configuration.html</a><br>
&gt; &gt;&gt; &gt; you can specify a name, default value and use it on an @Inject to<br>
&gt; &gt;&gt; &gt; provide a value from env vars, system properties or provide a default.<br>
&gt; &gt;&gt; &gt; Given how core and useful this is - it feels like it should be part of<br>
&gt; &gt;&gt; &gt; the CDI specification; its one simple annotation.<br>
&gt; &gt;&gt; &gt; Currently deltaspike provides a way to configure different sources and<br>
&gt; &gt;&gt; &gt; whatnot which is cool; I&#39;d be happy if CDI just had a simpler<br>
&gt; annotation<br>
&gt; &gt;&gt; &gt; which was only bound to env vars / system properties.<br>
&gt; &gt;&gt; &gt; e.g. @EnvironmentProperty(name = &quot;envvar&quot;, deafultValue=&quot;cheese&quot;)<br>
&gt; &gt;&gt; &gt; There could be debate on whether env vars or system properties should<br>
&gt; &gt;&gt; &gt; win if the same name is used for both; in a dockerized world I&#39;d<br>
&gt; prefer env<br>
&gt; &gt;&gt; &gt; vars to win but folks can always tinker with their run command to<br>
&gt; make sure<br>
&gt; &gt;&gt; &gt; they pass in env vars as system properties to work around this I<br>
&gt; guess.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; This message was sent by Atlassian JIRA<br>
&gt; &gt;&gt; (v6.3.11#6341)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; ------------------------------<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; _______________________________________________<br>
&gt; &gt;&gt; cdi-dev mailing list<br>
&gt; &gt;&gt; <a href="mailto:cdi-dev@lists.jboss.org">cdi-dev@lists.jboss.org</a><br>
&gt; &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;&gt;<br>
&gt; &gt;&gt; Note that for all code provided on this list, the provider licenses the<br>
&gt; &gt;&gt; code under the Apache License, Version 2<br>
&gt; &gt;&gt; (<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<br>
&gt; &gt;&gt; provided on this list, the provider waives all patent and other<br>
&gt; intellectual<br>
&gt; &gt;&gt; property rights inherent in such information.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; End of cdi-dev Digest, Vol 51, Issue 9<br>
&gt; &gt;&gt; **************************************<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<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<br>
&gt; code<br>
&gt; &gt; under the Apache License, Version 2<br>
&gt; &gt; (<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<br>
&gt; &gt; provided on this list, the provider waives all patent and other<br>
&gt; intellectual<br>
&gt; &gt; property rights inherent in such information.<br>
&gt;<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20150206/bb2c4eaa/attachment.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20150206/bb2c4eaa/attachment.html</a><br>
<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.<br>
<br>
End of cdi-dev Digest, Vol 51, Issue 12<br>
***************************************<br>
</blockquote></div><br></div></div>