Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
37.2. Adding Custom Interceptors Declaratively
Procedure 37.1. Adding Custom Interceptors
Define Custom Interceptors
All custom interceptors must extendorg.infinispan.interceptors.base.BaseCustomInterceptor
.Define the Position of the New Custom Interceptor
Interceptors must have a defined position. These options are mutually exclusive, meaning an interceptor cannot have both a position attribute and index attribute. Valid options are:via Position Attribute
FIRST
- Specifies that the new interceptor is placed first in the chain.LAST
- Specifies that the new interceptor is placed last in the chain.OTHER_THAN_FIRST_OR_LAST
- Specifies that the new interceptor can be placed anywhere except first or last in the chain.
via Index Attribute
- The
index
identifies the position of this interceptor in the chain. This index begins at 0, being the first position in the chain, and goes up to a number of interceptors in a given configuration.
via Before or After Attributes
- The
after
attributes places the new interceptor directly after the instance of the named interceptor, specified via its fully qualified class name. - The
before
attribute places the new interceptor directly before the instance of the named interceptor, specified via its fully qualified class name.
Define Interceptor Properties
Define specific interceptor properties.
Apply Other Custom Interceptors
In this example, the next custom interceptor is called CustomInterceptor2.
Note
OTHER_THAN_FIRST_OR_LAST
may cause the CacheManager to fail.
Note