uCosminexus Application Server, EJB Container Functionality Guide
The execution order of an interceptor is determined according to the following rules by default:
Note that the execution order of the default interceptor described here can be changed using the following method:
Points (1) to (4) describe these rules and the execution order combining the rules for overwriting annotations based on DD. For details on overwriting an annotation based on DD, see 12.6.2 Overwriting annotations based on DD in the uCosminexus Application Server Common Container Functionality Guide.
The following table describes the execution order of the interceptors when the definition for controlling the invocation of the default interceptor and class level interceptor is specified. In this table, the execution order for combinations shown by Y/N in the column Use of <interceptor-order> for each item number is shown by numbers in front of the DD or annotation in the column Execution order of the interceptor.
Table 2-51 Execution order of the interceptors (when the definition for controlling the invocation of the default interceptor and class level interceptor is specified)
No. | Use of <interceptor-order> | Execution order of the interceptor | |||||
---|---|---|---|---|---|---|---|
Default | Class level | Method level | Default | Class level | Method level | Interceptor method | |
1 | Y | Y | Y | -- | -- | 1. DD | 2. Annotation |
2 | Y | Y | N | -- | -- | 1. Annotation 2. DD |
3. Annotation |
3 | Y | N | Y | -- | -- | 1. DD | 2. Annotation |
4 | Y | N | N | -- | -- | 1. Annotation 2. DD |
3. Annotation |
5 | N | Y | Y | -- | -- | 1. DD | 2. Annotation |
6 | N | Y | N | -- | -- | 1. Annotation 2. DD |
3. Annotation |
7 | N | N | Y | -- | -- | 1. DD | 2. Annotation |
8 | N | N | N | -- | -- | 1. Annotation 2. DD |
3. Annotation |
The following table describes the execution order of the interceptors when the definition for controlling the invocation of the default interceptor is specified. In this table, the execution order for combinations shown by Y/N in the column Use of <interceptor-order> for each item number is shown by numbers in front of the DD or annotation in the column Execution order of the interceptor.
Table 2-52 Execution order of the interceptors (when the definition for controlling the invocation of the default interceptor is specified)
No. | Use of <interceptor-order> | Execution order of the interceptor | |||||
---|---|---|---|---|---|---|---|
Default | Class level | Method level | Default | Class level | Method level | Interceptor method | |
1 | Y | Y | Y | -- | -- | 1. DD | 2. Annotation |
2 | Y | Y | N | -- | 1. DD | 2. Annotation 3. DD |
4. Annotation |
3 | Y | N | Y | -- | -- | 1. DD | 2. Annotation |
4 | Y | N | N | -- | 1.Annotation 2. DD |
3. Annotation 4. DD |
5. Annotation |
5 | N | Y | Y | -- | -- | 1. DD | 2. Annotation |
6 | N | Y | N | -- | 1. DD | 2. Annotation 3. DD |
4. Annotation |
7 | N | N | Y | -- | -- | 1.DD | 2. Annotation |
8 | N | N | N | -- | 1. Annotation 2. DD |
3. Annotation 4. DD |
5. Annotation |
The following table describes the execution order of the interceptors when the definition for controlling the invocation of the class level interceptor is specified. In this table, the execution order for combinations shown by Y/N in the column Use of <interceptor-order> for each item number is shown by numbers in front of the DD or annotation in the column Execution order of the interceptor.
Table 2-53 Execution order of the interceptors (when the definition for controlling the invocation of the class level interceptor is specified)
No. | Use of <interceptor-order> | Execution order of the interceptor | |||||
---|---|---|---|---|---|---|---|
Default | Class level | Method level | Default | Class level | Method level | Interceptor method | |
1 | Y | Y | Y | -- | -- | 1. DD | 2. Annotation |
2 | Y | Y | N | 1. DD | -- | 2. Annotation 3. DD |
4. Annotation |
3 | Y | N | Y | -- | -- | 1. DD | 2. Annotation |
4 | Y | N | N | 1. DD | -- | 2. Annotation 3. DD |
4. Annotation |
5 | N | Y | Y | -- | -- | 1. DD | 2. Annotation |
6 | N | Y | N | 1. DD | -- | 2. Annotation 3. DD |
4. Annotation |
7 | N | N | Y | -- | -- | 1. DD | 2. Annotation |
8 | N | N | N | 1. DD | -- | 2. Annotation 3. DD |
4. Annotation |
The following table describes the execution order of the interceptors when the definition for controlling the invocation of the upper level interceptor is not specified. In this table, the execution order for combinations shown by Y/N in the column Use of <interceptor-order> for each item number is shown by numbers in front of the DD or annotation in the column Execution order of the interceptor.
Table 2-54 Execution order of the interceptors (when the definition for controlling the invocation of the upper level interceptor is not specified)
No. | Use of <interceptor-order> | Execution order of the interceptor | |||||
---|---|---|---|---|---|---|---|
Default | Class level | Method level | Default | Class level | Method level | Interceptor method | |
1 | Y | Y | Y | -- | -- | 1. DD | 2. Annotation |
2 | Y | Y | N | -- | 1. DD | 2. Annotation 3. DD |
4. Annotation |
3 | Y | N | Y | -- | -- | 1. DD | 2. Annotation |
4 | Y | N | N | 1. DD | 2. Annotation 3. DD |
4.Annotation 5. DD |
6. Annotation |
5 | N | Y | Y | -- | -- | 1.DD | 2. Annotation |
6 | N | Y | N | -- | 1. DD | 2. Annotation 3. DD |
4. Annotation |
7 | N | N | Y | -- | -- | 1.DD | 2. Annotation |
8 | N | N | N | 1. DD | 2. Annotation 3. DD |
4. Annotation 5. DD |
6. Annotation |
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.