jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: [ejb-spec users] Re: Re: Interceptors spec 1.2 draft is available for review

From: Jean-Louis MONTEIRO <jeanouii_at_gmail.com>
Date: Mon, 11 Feb 2013 12:06:40 +0100

Good proposal and I also think it would be really valuable.

Thanks Antonio!

Jean-Louis


2013/2/10 Antonio Goncalves <antonio.goncalves_at_gmail.com>

> Hi all,
>
> I read the spec, nothing much to say and waiting for the update with
> around-construct. But one point that bothers me : after reading the
> document I get confused on which component model allows which kind of
> interceptors. So I have to re-read the spec. Wouldn't it be easier to have
> a table that would look like this :
>
>
> Component | Around-invoke | Around-timeout | Around-construct | Life cycle
> | Interceptor binding | Default interceptor | Ordering
>
> ----------+---------------+----------------+------------------+------------+---------------------+---------------------+---------
> EJB | Y | Y | Y | Y
> | | |
> CDI Bean | Y | N | Y | Y
> | | |
> Servlet | N | N | N | N
> | | |
> JAX-WS | ... | ... | ... | ...
> | | |
> JAX-RS | ... | ... | ... | ...
> | | |
> ... | ... | ... | ... | ...
> | | |
>
> The specification talks mainly about CDI and EJB, but at some point talks
> about JAX-WS (and the MessageContext), but what about JAX-RS, Servlets,
> MDB... it would be clearer to have a table that summarizes the spec.
>
> My 2 cents
> Antonio
>
> PS : BTW, at the beginning of the document it says "JSR 318 Interceptors
> 1.2". Strange, still attached to EJB 3.1 ? What about EJB 3.2 ? And what
> about evolving on its own JSR ?
>
>
> On Sun, Feb 10, 2013 at 2:32 AM, Marina Vatkina <marina.vatkina_at_oracle.com
> > wrote:
>
>> The @Priority is defined in the common annotation spec:
>> http://java.net/projects/**javaee-spec/pages/**CommonAnnotations1_2MR<http://java.net/projects/javaee-spec/pages/CommonAnnotations1_2MR>and it's value attribute is of type int. The Interceptors spec uses that
>> value to setup the ranges.
>>
>> We will need to teach people to use 10 or 50 or even 100 as the add-on to
>> the range bottom ;)
>>
>> Best,
>> -marina
>>
>>
>> On 2/8/13 6:09 PM, David Blevins wrote:
>>
>>> Like Mark, my vote would be for float or double -- probably double.
>>>
>>>
>>> In the simple case it looks like an int, but has the flexibility if
>>> someone does something like @Priority(1), @Priority(2), @Priority(3),
>>> @Priority(4) with no forethought that they should leave space or how much
>>> space they should leave.
>>>
>>> If someone does the above it's very much a "rock and hard place" type of
>>> issue. With float you could always later sneak an interceptor into any
>>> stack, say @Priority(2.5). Or more likely, someone used @Priority(1) and
>>> then someone comes along later and wants to slip in an interceptor ahead of
>>> it @Priority(0.5)
>>>
>>> In my mind float/double allows people to still use ints in source yet is
>>> future-proof. No possible way they can code themselves into a corner.
>>>
>>>
>>> -David
>>>
>>> On Feb 6, 2013, at 8:49 AM, Jeremy Bauer <jrbauer_at_us.ibm.com> wrote:
>>>
>>> Hi Marina,
>>>>
>>>> One minor comment/question. Rather than using integer-based priority
>>>> ranges, did you consider using strict priority types and weight? For
>>>> example, @Priority(type=APPLICATION, weight=10). An integral value with
>>>> proposed ranges is simpler and very flexible, but using a specific type
>>>> would make the intent of the interceptor/interception point more concrete.
>>>>
>>>> -Jeremy
>>>>
>>>>
>>>>
>>>> From: Jeremy Bauer/Rochester/IBM_at_IBMUS
>>>> To: marina.vatkina_at_oracle.com,
>>>> Cc: jsr345-experts_at_ejb-spec.java.**net<jsr345-experts_at_ejb-spec.java.net>
>>>> Date: 02/04/2013 10:18 AM
>>>> Subject: [ejb-spec users] [jsr345-experts] Re: Re: Interceptors
>>>> spec 1.2 draft is available for review
>>>>
>>>>
>>>>
>>>> Thanks, Marina.
>>>>
>>>> It certainly was a lot of work, which is even more evident from the
>>>> diff! Thank you for posting. It is helpful. I'll post comments soon.
>>>>
>>>> -Jeremy
>>>>
>>>>
>>>>
>>>> From: Marina Vatkina <marina.vatkina_at_oracle.com>
>>>> To: jsr345-experts_at_ejb-spec.java.**net<jsr345-experts_at_ejb-spec.java.net>
>>>> ,
>>>> Date: 02/01/2013 08:31 PM
>>>> Subject: [ejb-spec users] [jsr345-experts] Re: Interceptors spec
>>>> 1.2 draft is available for review
>>>>
>>>>
>>>>
>>>> I uploaded the file with diffs if it's of any help:
>>>> http://java.net/projects/**interceptors-spec/downloads/**
>>>> download/interceptor-1-2-dr1-**diff.pdf<http://java.net/projects/interceptors-spec/downloads/download/interceptor-1-2-dr1-diff.pdf>
>>>>
>>>> -marina
>>>>
>>>> On 2/1/13 1:31 PM, Marina Vatkina wrote:
>>>> Hi Jeremy,
>>>>
>>>> It was a lot of work ;). I can create a diff from the original+ (i.e.
>>>> the version that Linda created in the framemaker from 1.1), but it will
>>>> also show a lot of changes, not the changes for a specific sentence.
>>>>
>>>> -marina
>>>>
>>>> On 2/1/13 1:16 PM, Jeremy Bauer wrote:
>>>> Hi Marina,
>>>>
>>>> The change bars cover nearly the entire document, making it difficult
>>>> to target the updated sections. If possible, can you provide a document
>>>> with more accurate change bars?
>>>>
>>>> -Jeremy
>>>>
>>>>
>>>>
>>>> From: Marina Vatkina <marina.vatkina_at_oracle.com>
>>>> To: jsr345-experts_at_ejb-spec.java.**net<jsr345-experts_at_ejb-spec.java.net>,
>>>> Pete Muir <pmuir_at_redhat.com>,
>>>> Date: 01/29/2013 04:07 PM
>>>> Subject: [jsr345-experts] Interceptors spec 1.2 draft is
>>>> available for review
>>>>
>>>>
>>>>
>>>> After a lot of work by Linda, me, and Pete, we have the Interceptors
>>>> spec 1.2 draft for review:
>>>> http://java.net/projects/**interceptors-spec/downloads/**
>>>> download/interceptor-1-2-dr1.**pdf<http://java.net/projects/interceptors-spec/downloads/download/interceptor-1-2-dr1.pdf>
>>>>
>>>> What's there:
>>>> Editorial cleanup and conversion to standard template.
>>>> Assigned chapter numbers to sections and rearranged various sections and
>>>> examples for better flow.
>>>> Clarified statement regarding transaction context of lifecycle callback
>>>> methods
>>>> Added a note on a timeout method that is also a business method and
>>>> around-timeout and around-invoke interceptors
>>>> Added Chapter 1 (Overview)
>>>> Added Chapter 3, derived from Chapter 9 of the CDI specification.
>>>> Removed deployment descriptors definitions (general notes about
>>>> possibility of DDs are there)
>>>> Added examples with interceptor bindings to common sections.
>>>> Added standard Priority ranges
>>>>
>>>> What's not there:
>>>> @AroundConstruct interceptor
>>>> Notes on "throws Exception" clauses in the around-xxx method signatures
>>>> Perfect CDI alignment - the text (and fonts) might be not fully aligned.
>>>>
>>>> Please review ASAP.
>>>>
>>>> Pete, please forward to the CDI EG.
>>>>
>>>> thanks,
>>>> -marina
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>
>
> --
> Antonio Goncalves
> Software architect and Java Champion
>
> Web site <http://www.antoniogoncalves.org> | Twitter<http://twitter.com/agoncal>|
> LinkedIn <http://www.linkedin.com/in/agoncal> | Paris JUG<http://www.parisjug.org> |
> Devoxx France <http://www.devoxx.fr>
>



-- 
Jean-Louis