uCosminexus Application Server, API Reference Guide

[Contents][Index][Back][Next]

2.1.4 Scope of support for the annotations included in the javax.interceptor package

This subsection describes the applicability of annotations of the javax.interceptor package. The following sections describe the annotations that you can code in each component:

You can also use the javax.interceptor package annotations in a CDI application. However, take care when you use these annotations by combining with EJB. For details on the precautions to be taken, see 9. Using CDI with Application Server in the uCosminexus Application Server Common Container Functionality Guide.

Organization of this subsection
(1) WAR file (Servlet 3.0/Servlet 2.5 compliant)
(2) EJB-JAR file (EJB3.1/EJB3.0 compliant)
(3) Library JAR file (Servlets or JSPs)
(4) Library JAR file (Enterprise Bean, exception class, or other classes)

(1) WAR file (Servlet 3.0/Servlet 2.5 compliant)

No annotations can be used in a WAR file.

(2) EJB-JAR file (EJB3.1/EJB3.0 compliant)

The following table lists the annotations that you can code in an EJB-JAR file:

Table 2-16 Annotations (javax.interceptor package) that can be coded in an EJB-JAR file (EJB3.1/EJB3.0 compliant)

Annotation name Enterprise Bean Exception class Other class
Interface Session Bean Entity Bean Message-driven Bean Interceptor
Other than default Interceptor Default Interceptor
@AroundInvoke -- Y -- N Y Y -- --
@ExcludeClassInterceptors -- Y -- N -- -- -- --
@ExcludeDefaultInterceptors -- Y -- N -- -- -- --
@Interceptors -- Y -- N -- -- -- --

Legend:
Y: Supported.
N: Not supported by Application Server.
--: Not applicable.

(3) Library JAR file (Servlets or JSPs)

You cannot use the annotations in a servlet or JSP of a library JAR file.

(4) Library JAR file (Enterprise Bean, exception class, or other classes)

The following table lists the annotations that you can code in the Enterprise Beans, exception classes, or the other classes of a library JAR file:

Table 2-17 Annotations (javax.interceptor package) that can be use in a library JAR file (Enterprise Beans, exception classes, or other classes)

Annotation name Enterprise Bean Exception class
Interface Session Bean Entity Bean Message-driven Bean Interceptor
@AroundInvoke -- -- -- N Y --

Legend:
Y: Supported.
N: Not supported by Application Server.
--: Not applicable.