users@jta-spec.java.net

[jta-spec users] Re: Fwd: Priority of interceptors

From: Mark Little <mlittle_at_redhat.com>
Date: Tue, 5 Feb 2013 10:27:38 +0000

+1


On 4 Feb 2013, at 16:56, Paul Parkinson wrote:

> Hello,
>
> Please provide feedback on the assignment of a priority value for the transaction interceptor(s that provides the functionality behind the new Transactional annotation).
>
> This is analogous to the "0" value in/of OTS ;) and the current proposal is to use Interceptor.Priority.PLATFORM_BEFORE+200 (see below).
>
> Again as we are running very short on time prompt feedback is greatly appreciated.
>
> Thanks,
> Paul
>
> Begin forwarded message:
>
>> From: Linda DeMichiel <linda.demichiel_at_oracle.com>
>> Subject: Priority of interceptors
>> Date: January 31, 2013 2:22:18 PM EST
>> To: jsr342-experts_at_javaee-spec.java.net, Emmanuel Bernard <ebernard_at_redhat.com>, Paul Parkinson <paul.parkinson_at_oracle.com>
>>
>>
>> The revisions to the Interceptor spec to accommodate the improved
>> managed bean alignment are nearly complete. You can download the
>> current draft of the spec from the interceptor-spec.java.net project
>> at http://java.net/projects/interceptors-spec/downloads
>>
>> One of the issues that we still need to resolve, however, is the
>> assignment of priorities to the new transactional interceptors being
>> defined by JTA and the Bean Validation interceptors that handle
>> method validation.
>>
>> Section 5.5 of the Interceptors spec defines the following Priority
>> values (see the spec for the details):
>>
>> Interceptor.Priority.PLATFORM_BEFORE = 0
>> Interceptor.Priority.LIBRARY_BEFORE = 1000
>> Interceptor.Priority.APPLICATION = 2000
>> Interceptor.Priority.LIBRARY_AFTER = 3000
>> Interceptor.Priority.PLATFORM_AFTER = 4000
>>
>> In our earlier discussions, we concluded that transactional
>> interceptors needed to come relatively early in the interceptor chain.
>> To put a stake in the ground, we propose that we define these to have
>> a priority of Interceptor.Priority.PLATFORM_BEFORE+200.
>>
>> Validation interceptors, however, should come relatively late,
>> since they will ensure that the parameters that reach the method
>> (which might have been modified by other interceptors) are valid.
>> Again, to put a stake in the ground, we'll propose a priority of
>> Interceptor.Priority.PLATFORM_AFTER+1000.
>>
>> Comments please!
>>
>> Emmanuel, Paul, could you please consult with your expert groups
>> for further input as well...
>>
>> thanks,
>>
>> -Linda
>>
>>
>>
>

---
Mark Little
mlittle_at_redhat.com
JBoss, by Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903 Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt Parsons (USA) and Brendan Lane (Ireland).