• Post Reply Bookmark Topic Watch Topic
  • New Topic

Interceptors in EJB3.0  RSS feed

 
Nathan Mathi
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was going through EJB3.0 specs. Just correct me if my understanding is correct reg interceptors.

Assuming we are using Interceptor classes and it is associated with the bean:
--whenever there is a call to any business method, interceptor classes are invoked first before calling the business method.
--The Interceptor methods are used to perform any required operations prior to calling business mehtod e.g audit checking, security check etc as given in spec. Is there any other purpose interceptors are used which i'm missing?
--From the interceptor class, we can invoke methods from normal POJO class??
--At the end of interceptor method invocation nothing is passed to business method.

For ref, see EJB3.0 spec(simplified), P-25.

Thanks,
Nathan
[ July 07, 2006: Message edited by: Nathan Mathi ]
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like you understand it. But there is a lot more that you can use Interceptors for. Like Profiling your code without having to chang ethe code and put the stuff in it. Anything that you can think of.

Mark
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!