• Post Reply Bookmark Topic Watch Topic
  • New Topic

Verify if an Interceptor is invoked

 
Vani Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an interceptor (configured with beans.xml from the following link, IBM Specs) on JAX-RS resource method for checking user entitlements. How can i verify if the interceptor (method annotated with @AroundInvoke) is being invoked?
I know this might not be real question, please suggest if any ideas.
 
Michael Remijan
Author
Ranch Hand
Posts: 131
7
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code the interceptor to do some logging. If all else fails, throw an exception in the Interceptor then it should be prettyy clear if the interceptor is firing or not.
 
Vani Kumar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already have the logging check in my code, i saw the situation like some of developers from my team couldn't even invoke the @AroundInvoke method (and there were no compile or runtime errors). I was checking whether i can verify the call to @AroundInvoke method. My concern is if the interceptor isn't invoked and don't see any errors, i might be allowing the user to access the application without verifying the entitlements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!