• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Interceptors i ejb 3.0

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. If i use Interceptors for a bean
then the interceptors would be appliesd to all
business methods.
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@mishra
Interceptors can have basically three access levels.
1. Application ie with ejb-jar file
This are called default interceptors. The affect all
classes with their methods. Can only be specify in DD.
But Classes and method can be configured to ignore it.

2. The next is Class interceptor, yap, once declared
it is applicable to all the class methods, again except
it is ignored using dependency injector or DD.

3. Method level, apply to the method in which it is applied.

Also not the the transition is addictive, ie if interceptors are applied
to the application(default), ame for all class methods.
Check the spec for more details.
Hope it helps.
 
Lalit mishra
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for a good piece of information can you pllease tell the syntax for class scope Interceptor and method scope Interceptor
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by gaurav singhal:
Thanks for a good piece of information can you pllease tell the syntax for class scope Interceptor and method scope Interceptor



You would normally use @Interceptors(...) annotation just before the class or the method.You can also achieve this using xml dd.

In the above (...) ... is a single argument which specifies the interceptor class.So it can be myInterceptor.class.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic