Skip to content

Instantly share code, notes, and snippets.

@abhirockzz
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/770b27cd172813367fce to your computer and use it in GitHub Desktop.
Save abhirockzz/770b27cd172813367fce to your computer and use it in GitHub Desktop.
Lifecycle Callback interceptors @AroundConstruct
public class ConstructorInterceptor{
@AroundConstruct
public Object interceptorMethod(InvocationContext ictx) throws Exception{
//logic goes here
}
}
public class APOJO{
@Interceptors(ConstructorInterceptor.class)
public APOJO(){
//any calls to this constructor will be intercepted by ConstructorInterceptor.interceptorMethod()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment