<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">2015-08-25 19:10 GMT+02:00 Nigel Deakin <span dir="ltr">&lt;<a href="mailto:nigel.deakin@oracle.com" target="_blank">nigel.deakin@oracle.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I&#39;m sorry I don&#39;t understand you. I thought you were asking about an API which does not use annotation.<br>
<br></blockquote><div><br></div><div>Both are needed (like websocket spec). Annotation one is nice for fully business code and/or simple libs but relying on CDI allows to simplify the wiring since you can reuse CDI beans under the hood ie have an implicit connection factory if there is a single one etc which is not possible in fully SE context.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nigel<span class=""><br>
<br>
On 25/08/2015 18:03, Romain Manni-Bucau wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
Integrating it in CDI lifecycle through an event allow CDI users to still use it in the right phase of the container<br>
boot so it is still important IMO and avoid all users to have their own custom listener for it -<br>
@Initialized(AppScoped.class). Also allow to enrich the API through the event itself making things smoother IMO.<br>
<br>
<br>
Romain Manni-Bucau<br></span>
@rmannibucau &lt;<a href="https://twitter.com/rmannibucau" rel="noreferrer" target="_blank">https://twitter.com/rmannibucau</a>&gt; | Blog &lt;<a href="http://rmannibucau.wordpress.com" rel="noreferrer" target="_blank">http://rmannibucau.wordpress.com</a>&gt; | Github<br>
&lt;<a href="https://github.com/rmannibucau" rel="noreferrer" target="_blank">https://github.com/rmannibucau</a>&gt; | LinkedIn &lt;<a href="https://www.linkedin.com/in/rmannibucau" rel="noreferrer" target="_blank">https://www.linkedin.com/in/rmannibucau</a>&gt; | Tomitriber<br>
&lt;<a href="http://www.tomitribe.com" rel="noreferrer" target="_blank">http://www.tomitribe.com</a>&gt;<br>
<br>
2015-08-25 18:58 GMT+02:00 Nigel Deakin &lt;<a href="mailto:nigel.deakin@oracle.com" target="_blank">nigel.deakin@oracle.com</a> &lt;mailto:<a href="mailto:nigel.deakin@oracle.com" target="_blank">nigel.deakin@oracle.com</a>&gt;&gt;:<span class=""><br>
<br>
    On 25/08/2015 17:35, Romain Manni-Bucau wrote:<br>
<br>
        well was thinking to both but I see it really nice to not rely only on annotation - and aligned with most specs<br>
        - since<br>
        sometimes you just want to either be able to rely on a loop or a custom config to register your listeners.<br>
        Annotations<br>
        are too rigid for such cases.<br>
<br>
<br>
    Obviously, if users don&#39;t want to use CDI (or MDBs, which are also declarative), then they would use the normal JMS<br>
    API. The existing API to register an async message listener isn&#39;t good enough, and we may improve it in JMS 2.1, but<br>
    that&#39;s not something that I&#39;d want to bother the people on cdi-dev with.<br>
<br>
    Nigel<br>
<br>
<br>
</span></blockquote>
</blockquote></div><br></div></div>