Skip to main content

[javaee-spec users] [jsr342-experts] Clarifying Interceptor usage in the EE Spec ?

  • From: Antonio Goncalves <antonio.goncalves@...>
  • To: jsr342-experts@...
  • Subject: [javaee-spec users] [jsr342-experts] Clarifying Interceptor usage in the EE Spec ?
  • Date: Mon, 11 Feb 2013 13:51:31 +0100
  • List-id: <jsr342-experts.javaee-spec.java.net>

Hi all,

As you might know the Interceptor 1.2 specification has made lots of progress lattelly (still some updates in the pipe though). After reading the document I got a bit confused on which component model were allowed in which type of interceptors. So I proposed the spec leads 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    |    ...        |      ...       |      ...         |     ...    |                     |                     |
...       |    ...        |      ...       |      ...         |     ...    |                     |                     |


This is what Pete Muir answered "when we drafted this we tried to not describe how interceptors work in CDI or EJB. Instead, we tried to describe how interceptors work, along with any extension points where other specs may alter or add functionality. We then gave examples of how EJB and CDI do extend the spec (partly as that is what we know best, partly as they are the main users of the spec)." and then Pete added "Antonio, I think your table would be a good fit for the Java EE spec though!"

Sometimes developpers get confused about what to use when. Can a JAX-WS use interceptors ? Well, no, but if it's treated like a @Stateless EJB, yes. Do you think that having such a recap table would make sense in the Java EE spec ?

Antonio


[javaee-spec users] [jsr342-experts] Clarifying Interceptor usage in the EE Spec ?

Antonio Goncalves 02/11/2013

[javaee-spec users] [jsr342-experts] Re: Clarifying Interceptor usage in the EE Spec ?

Linda DeMichiel 02/11/2013

[javaee-spec users] [jsr342-experts] Re: Clarifying Interceptor usage in the EE Spec ?

Antonio Goncalves 02/12/2013
 
 
Close
loading
Please Confirm
Close