<div dir="ltr">Hi all,<div><br></div><div>I really have some concerns about adding configuration into CDI but I can see benefits too. And what about adding it... and not adding it at the same time ? In Bean Validation 1.0, the Expert Group decided not to include method-level validation in the spec (it was included in 1.1). But what they did is to add it as a proposal in the Appendix.</div><div><br></div><div>If we feel some configuration should get in, why not have a proposal in the Appendix of CDI 2.0 ? It could then be implemented by Weld (and OpenWebBeans if they feel like it). And then, if it's successful and things get easier, get its own JSR for Java EE 9.</div><div><br></div><div>WDYT ?</div><div><br></div><div>Antonio</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 8, 2014 at 7:03 AM, Romain Manni-Bucau <span dir="ltr"><<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Hmm</p>
<p>I see config jsr as a jse spec which would allow EE injections in config components in EE containers (exactly like jbatch).</p>
<p>This way it can be used without any container or with any container easily. Only limit will be to not do something cdi/known containers will not support I think.</p>
<p>Not sure EE side is needed today, a lot can already be done without it and it can be enhanced later adding some integration words.</p>
<div class="gmail_quote">Le 8 sept. 2014 00:01, "Anatole Tresch" <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>> a écrit :<div><div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:large"><div class="gmail_default" style="font-family:arial,sans-serif">Hi Romain<br></div><div class="gmail_default" style="font-family:arial,sans-serif"><div class="gmail_default"><br></div><div class="gmail_default">just a few remarks inline...</div><div class="gmail_default"><br></div><div class="gmail_default"><div class="gmail_default">Summarizing</div><div class="gmail_default">1) injection of values, reinjection, feedback on config changes can all be done with already existing features (producers, extensions).</div><div class="gmail_default">2) configuring/bootstrapping CDI itself, e.g. configuration, is targeted with CDI 2.0 (see spec failing)</div><div class="gmail_default"><br></div><div class="gmail_default">So basically we could try to look if there is enough interest to standardize configuration in a more general way. For deployment aspects we need an EE JSR, for the rest, another SE standard may be an option as well... tbd...</div><div class="gmail_default"><br></div></div><div class="gmail_default">-Anatole</div><div class="gmail_extra" style="font-size:13px"><br><br><div class="gmail_quote"><span>2014-09-08 0:10 GMT+02:00 Romain Manni-Bucau <span dir="ltr"><<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">well sorry to pop in so late but here are my 2cts<br></blockquote></span><div class="gmail_default" style="font-size:large">easy ;)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Config JSR is more about environment config IMHO and putting it in CDI<br>doesn't make sense since more or more spec works without any other<br>spec - CDI in our case.</blockquote><div><div class="gmail_default" style="font-size:large">CDI even with some config mechanism added would still work "standalone".</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This mean CDI can't be the place but should<br>just be the bridge for config JSR.</blockquote><div><div class="gmail_default" style="font-size:large">As I suggested as well.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Plus CDI config will surely highly<br>be an application config first (beans.xml should be the place then)<br></blockquote><div><div class="gmail_default" style="font-size:large">Yes, app config, but beware people of writing config into beans.xml. That is definitively in most cases not what you want. CDI should not define, where and how config is located and formatted. CDI should provide a SPI, where config providers can publish the configured values, so it can be injected wherever needed. E.g. some kind of producer, that can provide multiple objects to be injected and can benefit from some kind of callback mechanism would be sufficient...</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">then environment config can be done at EE level (saying it has to<br>support placeholders or any pre deployment processing).<br></blockquote><div class="gmail_default" style="font-size:large">Config is much more complex. There is no clear border what is environment config or environment dependent and what not. This depends on what kind of application you have deployed. As an example the email address, where you send error messages, can be different depenending on the stage/environment, but this is not EE related config entry. Also what an environment is, is not a thing that you can define completely. So I agree not to add this complexities to CDI, I would hide them between some kind of "config provider", as mentioned above. CDI does not need to know if the config provided is environment dependent or not, its just what is visible at a current runtime state...</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">If you put something like ProjectStage in CDI it is great but then you<br>have it in JSF, CDI and finally surely all specs...same as<br>converters...<br></blockquote><div><div class="gmail_default" style="font-size:large">That was originally the idea, when doing a EE config JSR, but without such standard. I agree, CDI is not the place to define them.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Config should really be split in:<br>1) spec dependent config -> spec.xml<br>2) *common* config (a bit like javax.annotation) for environment and<br>external configuration -> Config JSR<br></blockquote><div class="gmail_default" style="font-size:large">Not 100% sure, if a get the point here...</div></div></div></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,sans-serif"><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-09-08 0:10 GMT+02:00 Romain Manni-Bucau <span dir="ltr"><<a href="mailto:rmannibucau@gmail.com" target="_blank">rmannibucau@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">well sorry to pop in so late but here are my 2cts<br>
<br>
Config JSR is more about environment config IMHO and putting it in CDI<br>
doesn't make sense since more or more spec works without any other<br>
spec - CDI in our case. This mean CDI can't be the place but should<br>
just be the bridge for config JSR. Plus CDI config will surely highly<br>
be an application config first (beans.xml should be the place then)<br>
then environment config can be done at EE level (saying it has to<br>
support placeholders or any pre deployment processing).<br>
<br>
If you put something like ProjectStage in CDI it is great but then you<br>
have it in JSF, CDI and finally surely all specs...same as<br>
converters...<br>
<br>
Config should really be split in:<br>
1) spec dependent config -> spec.xml<br>
2) *common* config (a bit like javax.annotation) for environment and<br>
external configuration -> Config JSR<br>
<br>
wdyt?<br>
<span><font color="#888888"><br>
<br>
<br>
Romain Manni-Bucau<br>
Twitter: @rmannibucau<br>
Blog: <a href="http://rmannibucau.wordpress.com/" target="_blank">http://rmannibucau.wordpress.com/</a><br>
LinkedIn: <a href="http://fr.linkedin.com/in/rmannibucau" target="_blank">http://fr.linkedin.com/in/rmannibucau</a><br>
Github: <a href="https://github.com/rmannibucau" target="_blank">https://github.com/rmannibucau</a><br>
</font></span><div><div><br>
<br>
2014-09-07 23:39 GMT+02:00 Werner Keil <<a href="mailto:werner.keil@gmail.com" target="_blank">werner.keil@gmail.com</a>>:<br>
> Sounds like an argument for a CDI module rather than a separate JSR then?;-)<br>
><br>
> On Sun, Sep 7, 2014 at 11:32 PM, Anatole Tresch <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>> wrote:<br>
>><br>
>> I would not worry about CDI regarding licensing. Just the sentence was<br>
>> that Oracle does not want to have more ALv2 in addition to what is already<br>
>> there. So as long as we do things within CDI, no worries, I think. For new<br>
>> EE JSRs nevertheless this is a BIG issue and should be clarified by the EC!<br>
>><br>
>><br>
>> 2014-09-07 21:44 GMT+02:00 Werner Keil <<a href="mailto:werner.keil@gmail.com" target="_blank">werner.keil@gmail.com</a>>:<br>
>>><br>
>>> Indeed, and with CDI 1.2 (MR) and 2.0 offering even the Spec under ALv2<br>
>>> as a dual-license, this was discussed by EC Members but both JCP EC and<br>
>>> Oracle Legal/PMO seems fine with it, and CDI is already an essential<br>
>>> building block to Java EE 6/7, hence used with Glassfish, too. I wasn't<br>
>>> involved in these discussions, but given CDI is especially liberal and fully<br>
>>> accepted by JCP formalities and license policies, I don't really see what<br>
>>> the problem wss for Anatole's JSR attempt (though I know, both Oracle and<br>
>>> other EC Members/companies don't always prefer this kind of licensing...;-)<br>
>>><br>
>>> Werner<br>
>>><br>
>>> On Sun, Sep 7, 2014 at 9:28 PM, John D. Ament <<a href="mailto:john.d.ament@gmail.com" target="_blank">john.d.ament@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Ok, this mail has me more concerned than anything. Can you clarify this<br>
>>>> ALv2 statement? AFAIK, Weld (the CDI RI) is ALv2.<br>
>>>><br>
>>>> On Sun, Sep 7, 2014 at 3:12 PM, Anatole Tresch <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi All<br>
>>>>><br>
>>>>> unfortunately things seem quite complicated:<br>
>>>>><br>
>>>>> first of all, similarities with Deltaspike are basically not<br>
>>>>> accidental. The concepts we developed in Credit Suisse are very similar to<br>
>>>>> Deltaspike, though Deltaspike was not yet born at that time. Fortunately we<br>
>>>>> ended up with a similar kind of solution.<br>
>>>>> filtering still can be done. My idea is to define some kind of<br>
>>>>> "configuration provider", which then is dynamically asked for configuration.<br>
>>>>> How the provider is internally organized, is completely transparent to CDI.<br>
>>>>> This enables to have multi-layered, complex config solutions work the same<br>
>>>>> (from a view point of CDI) like simple programmatic test configurations<br>
>>>>> during unit tests. The config provider still can support filtering and<br>
>>>>> dynamic resolution as commonly used in configuration systems. Similarly the<br>
>>>>> format is basically also not fixed. Of course, would a reference<br>
>>>>> implementation provide a set of functionalities, but I would definitively<br>
>>>>> not define the exact configuration mechanism as part of the CDI (or even a<br>
>>>>> EE config JSR). Another reason, beside complexity and time, is the fact that<br>
>>>>> different companies handle, store and manage configuration differently, so a<br>
>>>>> mechanism must be flexible enough to accommodate these, without adoption<br>
>>>>> rate will be low. Furthermore this flexibility also keeps doors open for use<br>
>>>>> cases we do not know yet.<br>
>>>>> Also we have to separate some basically two types of configuration<br>
>>>>> aspects:<br>
>>>>><br>
>>>>> application config basically is injected into deployed components, but<br>
>>>>> basically only can affect deployment to the extend it can be managed and<br>
>>>>> injected by CDI. The basic architecture and design, how application servers<br>
>>>>> to load and deploy are basically not affected. This type of configuration<br>
>>>>> (mechanism) I see also as a possible addition to CDI, if we really fail to<br>
>>>>> do something in another JSR. With CDI going for a more modular design, even<br>
>>>>> basic configuration of CDI can be possible, given we have some kind of API,<br>
>>>>> we can access during CDI initialization.<br>
>>>>> On the other side deployment configuration affects directly how the<br>
>>>>> application server deploys the application. Configuration here would allow<br>
>>>>> to define datasources, EJBs, transactional aspects, security, persistence,<br>
>>>>> war and ear configurations etc. Basically everything you do as of today with<br>
>>>>> some kind of XML file, or annotation. Hereby enabling more flexibility into<br>
>>>>> the existing descriptors is relatively easy, but as mentioned by Mark,<br>
>>>>> constraint. Adding more flexibility raises other subtle problems. Imagine a<br>
>>>>> application module, e.g. a war, that defines everything it requires. There<br>
>>>>> is no need to configure anything more on server side (with spring you can do<br>
>>>>> this, with Java EE unfortunately not). But this has a severe consequence, it<br>
>>>>> would make the application really portable in the sense, that it can be<br>
>>>>> moved between different app servers (vendors) without any change (ideally).<br>
>>>>> As a result commercial profits of some vendor companies may be affected. I<br>
>>>>> think this is actually one of the key points, why things are getting so<br>
>>>>> complicated in that area.<br>
>>>>><br>
>>>>> Legal aspects also were discussed. One of them is a possible legal<br>
>>>>> clash of ALv2 with GPL. This is the case already within Glassfish, but one<br>
>>>>> of the reasons, why ALv2 was not acceptable to Oracle's legal department. At<br>
>>>>> the end we decided to use a BSD model. Even dual licensing BSD/ALv2 could<br>
>>>>> theoretically be an option. If you would choose ALv2, Oracle will not<br>
>>>>> include your RI into Glassfish, which is the RI for the EE Umbrella JSR,<br>
>>>>> meaning your JSR will not be included into EE8. So what should we do? I<br>
>>>>> don't have a good answer...<br>
>>>>><br>
>>>>> So, I like to discuss configuration aspects here. Nevertheless if we<br>
>>>>> decide to add config aspects, be aware that we might only (mainly) support<br>
>>>>> application config, since everything else directly would impact other JSRs.<br>
>>>>> And that is obviously quite similar to what Apache Deltaspike is all about<br>
>>>>> ;-)<br>
>>>>><br>
>>>>> Cheers,<br>
>>>>> Anatole<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> 2014-09-07 14:46 GMT+02:00 Mark Struberg <<a href="mailto:struberg@yahoo.de" target="_blank">struberg@yahoo.de</a>>:<br>
>>>>>><br>
>>>>>> Yes, the config group also was (obviously) looking at DeltaSpikes<br>
>>>>>> config mechanism as well.<br>
>>>>>> There were others who wanted to go more into the 'filtering' approach<br>
>>>>>> as done on WebLogic servers (though not sure who else does that as well).<br>
>>>>>> You know, having all the XML configs like WEB-INF/web.xml containing<br>
>>>>>> placeholders and the real values only get placed in there at deployment<br>
>>>>>> time. I personally find this approach a bit limited from a technical<br>
>>>>>> perspective and it already didn't work out for me when using WebLogic (what<br>
>>>>>> about changing a configured value after the deployment was done? What about<br>
>>>>>> security? Having passwords in web.xml, unit testing, ...).<br>
>>>>>> There are of course also other approaches which all might have strong<br>
>>>>>> sides and would have needed to get discussed.<br>
>>>>>><br>
>>>>>> But utterly the problem seems to have been legal reasons. We even<br>
>>>>>> offered to have Anatole/CS lead the EG and do the RI as an ASF project with<br>
>>>>>> substantial support and participation from the JBoss, DeltaSpike and TomEE<br>
>>>>>> communities.<br>
>>>>>><br>
>>>>>> Anyway, the time will come when we will resurrect this effort.<br>
>>>>>><br>
>>>>>> LieGrue,<br>
>>>>>> strub<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> On Sunday, 7 September 2014, 14:29, Werner Keil<br>
>>>>>> <<a href="mailto:werner.keil@gmail.com" target="_blank">werner.keil@gmail.com</a>> wrote:<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> Yep, it contains a simple but extendable notion of ProjectStage,<br>
>>>>>> too;-)<br>
>>>>>><br>
>>>>>><br>
>>>>>> On Sun, Sep 7, 2014 at 2:19 PM, John D. Ament <<a href="mailto:john.d.ament@gmail.com" target="_blank">john.d.ament@gmail.com</a>><br>
>>>>>> wrote:<br>
>>>>>><br>
>>>>>> Anatole,<br>
>>>>>><br>
>>>>>> I'm wondering if some of your configuration description falls under<br>
>>>>>> what was put together in DeltaSpike?<br>
>>>>>><br>
>>>>>> <a href="http://deltaspike.apache.org/configuration.html" target="_blank">http://deltaspike.apache.org/configuration.html</a><br>
>>>>>><br>
>>>>>> John<br>
>>>>>><br>
>>>>>><br>
>>>>>> On Fri, Sep 5, 2014 at 6:18 PM, Anatole Tresch <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>><br>
>>>>>> wrote:<br>
>>>>>><br>
>>>>>> Staging is not a question of xml or not xml (the "format" of config).<br>
>>>>>> You can do staged config also using xml, or based on a database or json<br>
>>>>>> config service. Staging as well as, more generally speaking, environment<br>
>>>>>> dependent config is more like to select/filter the right config that targets<br>
>>>>>> the current (runtime) environment. This might include stages, but also many<br>
>>>>>> other aspects are feasible and common (server, tier, ear, war, tenant ...).<br>
>>>>>> Since these aspects are per se very complex, it might be advisable to leave<br>
>>>>>> them out of any spec (even a dedicated config JSR would probably not be<br>
>>>>>> capable of covering these within the relatively short EE timeframe)...<br>
>>>>>><br>
>>>>>><br>
>>>>>> 2014-09-05 23:30 GMT+02:00 Werner Keil <<a href="mailto:werner.keil@gmail.com" target="_blank">werner.keil@gmail.com</a>>:<br>
>>>>>><br>
>>>>>> Jens/all,<br>
>>>>>><br>
>>>>>> A sort of "staging" already was possible using CDI earlier, see<br>
>>>>>> examples like this:<br>
>>>>>><br>
>>>>>> <a href="http://stackoverflow.com/questions/16907185/multiple-cdi-configuration-profiles-devel-beta-qa-production-in-one-war" target="_blank">http://stackoverflow.com/questions/16907185/multiple-cdi-configuration-profiles-devel-beta-qa-production-in-one-war</a><br>
>>>>>><br>
>>>>>> DeltaSpike also includes type-safe staging that goes beyond the<br>
>>>>>> primitive, hard-coded JSF enum.<br>
>>>>>><br>
>>>>>> If that works without XML, while still allowing flexible configuration<br>
>>>>>> for different stages or to add and "inject" additional stages maybe even on<br>
>>>>>> a tenant basis (for Cloud scenarios) I could see something like that work<br>
>>>>>> without XML. In the Multiconf project we managed to code everything in<br>
>>>>>> Python, and similar to Puppet or Chef you can configure and deploy multiple<br>
>>>>>> environments with it, Java EE, Spring or Play! several of them are<br>
>>>>>> configured this way and it requires no XML (where the container needs such<br>
>>>>>> files, the framework generates them;-)<br>
>>>>>><br>
>>>>>> Werner<br>
>>>>>><br>
>>>>>> On Fri, Sep 5, 2014 at 10:21 PM, <<a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">cdi-dev-request@lists.jboss.org</a>><br>
>>>>>> wrote:<br>
>>>>>><br>
>>>>>> Send cdi-dev mailing list submissions to<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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 'help' to<br>
>>>>>> <a href="mailto:cdi-dev-request@lists.jboss.org" target="_blank">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" target="_blank">cdi-dev-owner@lists.jboss.org</a><br>
>>>>>><br>
>>>>>> When replying, please edit your Subject line so it is more specific<br>
>>>>>> than "Re: Contents of cdi-dev digest..."<br>
>>>>>><br>
>>>>>><br>
>>>>>> Today's Topics:<br>
>>>>>><br>
>>>>>> 1. Re: Tools : Google Drive vs Asciidoc and Github (Anatole Tresch)<br>
>>>>>> 2. Re: With the end of Java Config... (Anatole Tresch)<br>
>>>>>> 3. [JBoss JIRA] (CDI-456) fix Bean#getBeanClass() definition<br>
>>>>>> (Anatole Tresch (JIRA))<br>
>>>>>> 4. Re: With the end of Java Config... (Jens Schumann)<br>
>>>>>><br>
>>>>>> ------------------------------<br>
>>>>>><br>
>>>>>> Message: 4<br>
>>>>>> Date: Fri, 5 Sep 2014 20:20:53 +0000<br>
>>>>>> From: Jens Schumann <<a href="mailto:jens.schumann@openknowledge.de" target="_blank">jens.schumann@openknowledge.de</a>><br>
>>>>>> Subject: Re: [cdi-dev] With the end of Java Config...<br>
>>>>>> To: Anatole Tresch <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>>, Antonio Goncalves<br>
>>>>>> <<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>><br>
>>>>>> Cc: cdi-dev <<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>><br>
>>>>>> Message-ID: <<a href="mailto:D02FDD99.396B9%25jens.schumann@openknowledge.de" target="_blank">D02FDD99.396B9%jens.schumann@openknowledge.de</a>><br>
>>>>>> Content-Type: text/plain; charset="windows-1252"<br>
>>>>>><br>
>>>>>> I can confirm that this approach works very well. We are using a<br>
>>>>>> similar approach a couple of years now, and I love the simplicity that comes<br>
>>>>>> with portable extensions and @Producer methods. See our public version here<br>
>>>>>> [1] (works since early CDI 1.0 days) .<br>
>>>>>><br>
>>>>>> Instead of a @Inject + Qualifier we just use the qualifier @Property.<br>
>>>>>> We support default values and type conversation for primitives and<br>
>>>>>> everything that has a string based constructor. The property source can be<br>
>>>>>> anything, from property files (default) to databases or xml files. For<br>
>>>>>> examples see tests here [2].<br>
>>>>>><br>
>>>>>> Nevertheless I am not sure if this should be part of an future CDI<br>
>>>>>> spec. My concerns include the bloat argument, of course. But the main reason<br>
>>>>>> relates to the fact that we have almost everything in the current CDI spec<br>
>>>>>> already.<br>
>>>>>><br>
>>>>>> Right now I am quite happy with an custom portable extension that does<br>
>>>>>> everything for me. At the time we implemented the extension we realised that<br>
>>>>>> the "hard part" was writing an extension that links a qualified "optional<br>
>>>>>> injection point" with an @Producer method while supporting code based<br>
>>>>>> default values. Luckily I had Arne in my team who did that within a few<br>
>>>>>> minutes.<br>
>>>>>><br>
>>>>>> Because of this experience I would propose that we simplify extension<br>
>>>>>> development such that "optional injection points" may be linked to @Produces<br>
>>>>>> values easily. Additionally we have to solve a few more integration issues<br>
>>>>>> (e.g. read-only DB access should be available during CDI startup).<br>
>>>>>> Everything else should be provided by portable extensions (e.g. via<br>
>>>>>> delta-spike) and documentation/howtos at <a href="http://cdi-spec.org" target="_blank">cdi-spec.org</a>.<br>
>>>>>><br>
>>>>>> Jens<br>
>>>>>> [1]<br>
>>>>>> <a href="https://github.com/openknowledge/openknowledge-cdi-extensions/tree/master/openknowledge-cdi-common/src/main/java/de/openknowledge/cdi/common/property" target="_blank">https://github.com/openknowledge/openknowledge-cdi-extensions/tree/master/openknowledge-cdi-common/src/main/java/de/openknowledge/cdi/common/property</a><br>
>>>>>> [2]<br>
>>>>>> <a href="https://github.com/openknowledge/openknowledge-cdi-extensions/blob/master/openknowledge-cdi-common/src/test/java/de/openknowledge/cdi/common/property" target="_blank">https://github.com/openknowledge/openknowledge-cdi-extensions/blob/master/openknowledge-cdi-common/src/test/java/de/openknowledge/cdi/common/property</a><br>
>>>>>><br>
>>>>>> Von: Anatole Tresch <<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a><mailto:<a href="mailto:atsticks@gmail.com" target="_blank">atsticks@gmail.com</a>>><br>
>>>>>> Datum: Friday 5 September 2014 21:22<br>
>>>>>> An: Antonio Goncalves<br>
>>>>>> <<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a><mailto:<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>>><br>
>>>>>> Cc: CDI-Dev <<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>>><br>
>>>>>> Betreff: Re: [cdi-dev] With the end of Java Config...<br>
>>>>>><br>
>>>>>> Hi all,<br>
>>>>>><br>
>>>>>> I would not like to add an XML "bloated" mechanism as part of CDI 2.0.<br>
>>>>>> Spontaneously I would propose a more CDI like things like:<br>
>>>>>><br>
>>>>>><br>
>>>>>> * Adding a @Configured annotation (basically a qualifier). This<br>
>>>>>> can be in addition to @Inject and would allow to inject "configured" values.<br>
>>>>>> * Since configuration can change we may think of a (CDI)<br>
>>>>>> event/reinject mechanism based on config changes. By default, this is<br>
>>>>>> switched off and we can discuss how it would be activated, e.g. by an<br>
>>>>>> additional flag settable with the @Configured annotation, or an additional<br>
>>>>>> @Observable ConfigChangeEvent (similar to the Griffon framework), or both.<br>
>>>>>> * Hereby configured values theoretically behave similar as all<br>
>>>>>> other injection points. They also can be qualified (the aspect of scopes, I<br>
>>>>>> did not yet have time to think about). The only difference is, that they are<br>
>>>>>> satisified using the configuration "system".<br>
>>>>>> * The configuration "source" itself could in the extreme simplest<br>
>>>>>> way be a Provider<Map<String,String>>. The CDI spec should not care about<br>
>>>>>> how this map is provided (XML, DB, overrides, etc). This still can be<br>
>>>>>> standardized later. As long as the ConfigurationSource SPI is defined,<br>
>>>>>> companies still can hook in the logic and level of configuration abstraction<br>
>>>>>> they need.<br>
>>>>>> * Of course, since not only Strings can be injected, we need some<br>
>>>>>> conversion or adapter logic as basically outlined in my blog. Also here we<br>
>>>>>> can add a simple SPI and let the details to the RI.<br>
>>>>>><br>
>>>>>> Summarizing a<br>
>>>>>><br>
>>>>>> * @Configured annotation<br>
>>>>>> * some kind of change event<br>
>>>>>> * a ConfigurationSource extends Provider<MapString,String>><br>
>>>>>> * a conversion mechanism from String to T.<br>
>>>>>><br>
>>>>>> we get a full fledged configuration mechanism that leverages CDI.<br>
>>>>>><br>
>>>>>> That would be my idea basically. WDYT? I will try to work that out in<br>
>>>>>> more details. Basically it should be implementable even with the CDI<br>
>>>>>> mechanism already in place with CDI 1.1.<br>
>>>>>><br>
>>>>>> Best,<br>
>>>>>> Anatole<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> 2014-09-05 16:08 GMT+02:00 Antonio Goncalves<br>
>>>>>> <<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a><mailto:<a href="mailto:antonio.goncalves@gmail.com" target="_blank">antonio.goncalves@gmail.com</a>>>:<br>
>>>>>> One wise man* once said "EJB was a hype specification, we added too<br>
>>>>>> many things to it, it became bloated. The next hype specifications are<br>
>>>>>> JAX-RS and CDI, careful with them"<br>
>>>>>><br>
>>>>>> Either we get this idea of "parts" right, or CDI will endup being<br>
>>>>>> bloated.<br>
>>>>>><br>
>>>>>> Antonio<br>
>>>>>><br>
>>>>>><br>
>>>>>> *David Blevin<br>
>>>>>><br>
>>>>>><br>
>>>>>> On Fri, Sep 5, 2014 at 3:28 PM, Antoine Sabot-Durand<br>
>>>>>> <<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a><mailto:<a href="mailto:antoine@sabot-durand.net" target="_blank">antoine@sabot-durand.net</a>>> wrote:<br>
>>>>>> Hi all,<br>
>>>>>><br>
>>>>>> You may have followed the rise and fall of the Java Config JSR<br>
>>>>>> (<a href="http://javaeeconfig.blogspot.ch/2014/09/no-java-ee-configuration-for-ee8-dear.html" target="_blank">http://javaeeconfig.blogspot.ch/2014/09/no-java-ee-configuration-for-ee8-dear.html</a>).<br>
>>>>>> Anatole in CC was leading this initiative and I proposed him to join<br>
>>>>>> us and explore if some part of his late-JSR could be done in CDI.<br>
>>>>>><br>
>>>>>> I?m mainly thinking of <a href="https://issues.jboss.org/browse/CDI-123" target="_blank">https://issues.jboss.org/browse/CDI-123</a> or<br>
>>>>>> related solution. If we achieve to have a majority of specs to integrate<br>
>>>>>> with CDI, our configuration solution would therefore become a configuration<br>
>>>>>> system for all spec based on CDI 2.0.<br>
>>>>>><br>
>>>>>> Antoine<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Antonio Goncalves<br>
>>>>>> Software architect, Java Champion and Pluralsight author<br>
>>>>>><br>
>>>>>> Web site<<a href="http://www.antoniogoncalves.org" target="_blank">http://www.antoniogoncalves.org</a>> |<br>
>>>>>> Twitter<<a href="http://twitter.com/agoncal" target="_blank">http://twitter.com/agoncal</a>> |<br>
>>>>>> LinkedIn<<a href="http://www.linkedin.com/in/agoncal" target="_blank">http://www.linkedin.com/in/agoncal</a>> |<br>
>>>>>> Pluralsight<<a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" target="_blank">http://pluralsight.com/training/Authors/Details/antonio-goncalves</a>><br>
>>>>>> | Paris JUG<<a href="http://www.parisjug.org" target="_blank">http://www.parisjug.org</a>> | Devoxx France<<a href="http://www.devoxx.fr" target="_blank">http://www.devoxx.fr</a>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a><mailto:<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Anatole Tresch<br>
>>>>>> Java Lead Engineer, JSR Spec Lead<br>
>>>>>> Gl?rnischweg 10<br>
>>>>>> CH - 8620 Wetzikon<br>
>>>>>><br>
>>>>>> Switzerland, Europe Zurich, GMT+1<br>
>>>>>> Twitter: @atsticks<br>
>>>>>> Blogs: <a href="http://javaremarkables.blogspot.ch/" target="_blank">http://javaremarkables.blogspot.ch/</a><br>
>>>>>> Google: atsticks<br>
>>>>>> Mobile <a href="tel:%2B41-76%20344%2062%2079" value="+41763446279" target="_blank">+41-76 344 62 79</a><br>
>>>>>> -------------- next part --------------<br>
>>>>>> An HTML attachment was scrubbed...<br>
>>>>>> URL:<br>
>>>>>> <a href="http://lists.jboss.org/pipermail/cdi-dev/attachments/20140905/3d951250/attachment.html" target="_blank">http://lists.jboss.org/pipermail/cdi-dev/attachments/20140905/3d951250/attachment.html</a><br>
>>>>>><br>
>>>>>> ------------------------------<br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>> End of cdi-dev Digest, Vol 46, Issue 20<br>
>>>>>> ***************************************<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Anatole Tresch<br>
>>>>>> Java Lead Engineer, JSR Spec Lead<br>
>>>>>> Glärnischweg 10<br>
>>>>>> CH - 8620 Wetzikon<br>
>>>>>><br>
>>>>>> Switzerland, Europe Zurich, GMT+1<br>
>>>>>> Twitter: @atsticks<br>
>>>>>> Blogs: <a href="http://javaremarkables.blogspot.ch/" target="_blank">http://javaremarkables.blogspot.ch/</a><br>
>>>>>> Google: atsticks<br>
>>>>>> Mobile <a href="tel:%2B41-76%20344%2062%2079" value="+41763446279" target="_blank">+41-76 344 62 79</a><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> _______________________________________________<br>
>>>>>> cdi-dev mailing list<br>
>>>>>> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
>>>>>> the code under the Apache License, Version 2<br>
>>>>>> (<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>
>>>>>> provided on this list, the provider waives all patent and other intellectual<br>
>>>>>> property rights inherent in such information.<br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>><br>
>>>>> --<br>
>>>>> Anatole Tresch<br>
>>>>> Java Lead Engineer, JSR Spec Lead<br>
>>>>> Glärnischweg 10<br>
>>>>> CH - 8620 Wetzikon<br>
>>>>><br>
>>>>> Switzerland, Europe Zurich, GMT+1<br>
>>>>> Twitter: @atsticks<br>
>>>>> Blogs: <a href="http://javaremarkables.blogspot.ch/" target="_blank">http://javaremarkables.blogspot.ch/</a><br>
>>>>> Google: atsticks<br>
>>>>> Mobile <a href="tel:%2B41-76%20344%2062%2079" value="+41763446279" target="_blank">+41-76 344 62 79</a><br>
>>>><br>
>>>><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Anatole Tresch<br>
>> Java Lead Engineer, JSR Spec Lead<br>
>> Glärnischweg 10<br>
>> CH - 8620 Wetzikon<br>
>><br>
>> Switzerland, Europe Zurich, GMT+1<br>
>> Twitter: @atsticks<br>
>> Blogs: <a href="http://javaremarkables.blogspot.ch/" target="_blank">http://javaremarkables.blogspot.ch/</a><br>
>> Google: atsticks<br>
>> Mobile <a href="tel:%2B41-76%20344%2062%2079" value="+41763446279" target="_blank">+41-76 344 62 79</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> cdi-dev mailing list<br>
> <a href="mailto:cdi-dev@lists.jboss.org" target="_blank">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<br>
> under the Apache License, Version 2<br>
> (<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>
> provided on this list, the provider waives all patent and other intellectual<br>
> property rights inherent in such information.<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><span style="font-family:arial;font-size:small"><b>Anatole Tresch</b></span><div style="font-family:arial;font-size:small">Java Lead Engineer, JSR Spec Lead<br>Glärnischweg 10<br>CH - 8620 Wetzikon</div><div style="font-family:arial;font-size:small"><br></div><div style="font-family:arial;font-size:small"><i>Switzerland, Europe Zurich, GMT+1</i></div><div style="font-family:arial;font-size:small"><i>Twitter: @atsticks</i></div><div><i style="font-family:arial;font-size:small">Blogs: </i><font face="arial"><i><a href="http://javaremarkables.blogspot.ch/" target="_blank">http://javaremarkables.blogspot.ch/</a></i></font></div><div style="font-family:arial;font-size:small"><i>Google: atsticks<br>Mobile <a href="tel:%2B41-76%20344%2062%2079" value="+41763446279" target="_blank">+41-76 344 62 79</a></i></div></div>
</div>
</blockquote></div></div></div>
<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></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Antonio Goncalves <br>Software architect, Java Champion and Pluralsight author<br><br><a href="http://www.antoniogoncalves.org" target="_blank">Web site</a> | <a href="http://twitter.com/agoncal" target="_blank">Twitter</a> | <a href="http://www.linkedin.com/in/agoncal" target="_blank">LinkedIn</a> | <a href="http://pluralsight.com/training/Authors/Details/antonio-goncalves" target="_blank">Pluralsight</a> | <a href="http://www.parisjug.org" target="_blank">Paris JUG</a> | <a href="http://www.devoxx.fr" target="_blank">Devoxx France</a></div>
</div>