<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014/1/15 Jozef Hartinger <span dir="ltr">&lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;</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">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Yes,<br>
      <br>
      the problem with this is that currently we cannot add a new method
      to the interface - otherwise we break existing implementations of
      the interface. We can either wait for Java 8 or find some other
      way of specifying the priority.</div></div></blockquote><div><br></div><div>One could think about supporting the <span class="">@</span>Priority annotation on implementations of j.e.i.s.Interceptor or have a derived interface PrioritizedInterceptor which adds the new method.</div>








<div><br></div><div>--Gunnar</div><div><br></div><div><br></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">
<div bgcolor="#FFFFFF" text="#000000"><div><span class=""><font color="#888888"><br>
      Jozef</font></span><div><div class="h5"><br>
      <br>
      On 01/15/2014 12:17 PM, Gunnar Morling wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">Hi Jozef,
        <div><br>
        </div>
        <div>Thanks for the clarification.</div>
        <div><br>
        </div>
        <div>Would it make sense to add Interceptor#getPriority() in a
          future spec revision and handle such a custom interceptor bean
          as if there was an equivalent annotated interceptor type? As
          it seems its currently not possible to achieve the semantics
          of an annotated interceptor type using a portable extension.</div>
        <div><br>
        </div>
        <div>--Gunnar</div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2014/1/15 Jozef Hartinger <span dir="ltr">&lt;<a href="mailto:jharting@redhat.com" target="_blank">jharting@redhat.com</a>&gt;</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">
            <div bgcolor="#FFFFFF" text="#000000">
              <div>Hi Gunnar,<br>
                <br>
                this is not possible. You can only enable the
                interceptor by adding it to
                AfterTypeDiscovery#getInterceptors() relatively to other
                interceptors.<br>
                <br>
                Jozef
                <div>
                  <div><br>
                    <br>
                    On 01/15/2014 10:56 AM, Gunnar Morling wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Hi,
                      <div><br>
                      </div>
                      <div>Using a CDI portable extension, I&#39;m
                        registering a custom bean which represents an
                        interceptor (by implementing the
                        javax.enterprise.inject.spi.Interceptor
                        interface).</div>
                      <div><br>
                      </div>
                      <div>My question now is how to specify the
                        priority of that interceptor. Intuitively I had
                        expected a method such as
                        Interceptor#getPriority(), but there isn&#39;t such
                        method.</div>
                      <div><br>
                      </div>
                      <div>In section 9 the spec says extensions could
                        &quot;override the interceptor order defined by the
                        @Priority annotation&quot; and refers to section
                        11.5.2 which introduces
                        AfterTypeDiscovery#getInterceptors(). So I could
                        use this to add my interceptor, but I don&#39;t see
                        how I could specify the priority while doing so.</div>
                      <div><br>
                      </div>
                      <div>How can this be achieved?</div>
                      <div><br>
                      </div>
                      <div>Many thanks,</div>
                      <div><br>
                      </div>
                      <div>--Gunnar</div>
                      <div><br>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
cdi-dev mailing list
<a href="mailto:cdi-dev@lists.jboss.org" target="_blank">cdi-dev@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/cdi-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/cdi-dev</a></pre>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div>