Index Changes

How to specify the Interception Scope

In AOP terms, interception scope is equivalent to the point cuts. The interception scope limits the Message Exchanges intercepted by an interceptor.

The interception scope is defined by interceptor configuration properties, these being :

Property Filter Message Exchange based on
provider service provider
consumer service consumer
message message type : ( "in", "out")
service service name, can be the local name or the fully qualified service name
endpoint endpoint name
status message exchange status : {"DONE", "ERROR", "ACTIVE"}

These filter properties are set as properties on the Intercept Annotation .

Examples of setting the scope on Interceptors

By default none of the interceptors are in scope. The scope can be defined by setting the intercept annotation filter properties.

Intercepting ACTIVE Message Exchanges

All ACTIVE message exchanges will be intercepted.

@Intercept (status="ACTIVE")
public void anInterceptor(...){}

Intercepting Message Exchanges for a specific service and endpoint

All message exchanges where service="notify-transit" and endpoint="transit_inbound" will be intercepted

@Intercept (service="notify-transit", endpoint="transit_inbound")
public void anInterceptor(...){}

If a application has endpoint links,then both the sides of the link are considered for matching the service/endpoint name.

Intercepting Message Exchanges for a specific consumer and provider

All message exchanges from "sun-http-binding" to "sun-bpel-engine" will be intercepted.

@Intercept (consumer="sun-http-binding", provider="sun-bpel-engine")
public void anInterceptor(...){}

Intercepting only incoming Messages

All incoming messages will be intercepted

@Intercept (message="in")
public void anInterceptor(...){}

If none of the filter properties are set on an interceptor, then it is never in scope. If one or more property is configured, the interceptor is fired for all message exchanges which match the set properties.

JSPWiki v2.4.100
« Home Index Changes Prefs
This page (revision-4) was last changed on 18-Sep-08 00:08 AM, -0700 by JBIWIKI