javax.interceptor
Annotation Type AroundInvoke


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface AroundInvoke

Defines an interceptor method that interposes on business methods. May be applied to any non-final, non-static method with a single parameter of type InvocationContext and return type Object of the target class (or superclass) or of any interceptor class.

 @AroundInvoke
 public Object intercept(InvocationContext ctx) throws Exception { ... }
 

A class may not declare more than one @AroundInvoke method.

An @AroundInvoke method can invoke any component or resource that the method it is intercepting can invoke.

@AroundInvoke method invocations occur within the same transaction and security context as the method on which they are interposing.

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



Submit a bug or feature

Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 4-June-2010 04:34