Top Description Methods
javax.interceptor

public @Interface AroundTimeout

extends Annotation
Annotations
@Target:METHOD
@Retention:RUNTIME
Imports
java.lang.annotation.RetentionPolicy, .ElementType, .Target, .Retention

Defines an interceptor method that interposes on timeout methods. The method must take a single parameter of type javax.interceptor.InvocationContext and have a return type java.lang.Object. The method must not be declared as abstract, final, or static.

@AroundTimeout
public Object interceptTimeout(InvocationContext ctx) throws Exception { ... }

AroundTimeout methods may be declared in interceptor classes, in the superclasses of interceptor classes, in the target class, and/or in superclasses of the target class.

A given class must not declare more than one AroundTimeout method.

An AroundTimeout method can invoke any component or resource that its corresponding timeout method can invoke.

javax.interceptor.InvocationContext#getTimer() allows any AroundTimeout method to retrieve the timer object associated with the timeout.

In general, AroundTimeout method invocations occur within the same transaction and security context as the timeout method on which they are interposing.

AroundTimeout methods may throw any exceptions that are allowed by the throws clause of the timeout method on which they are interposing. They may catch and suppress exceptions and recover by calling javax.interceptor.InvocationContext#proceed().

Since
Interceptors 1.1

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString