Forums Register Login

Interceptors i ejb 3.0

+Pie Number of slices to send: Send
1. If i use Interceptors for a bean
then the interceptors would be appliesd to all
business methods.
+Pie Number of slices to send: Send
@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.
+Pie Number of slices to send: Send
Thanks for the help
+Pie Number of slices to send: Send
Thanks for a good piece of information can you pllease tell the syntax for class scope Interceptor and method scope Interceptor
+Pie Number of slices to send: Send
 

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.
Heroic work plunger man. Please allow me to introduce you to this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 799 times.
Similar Threads
problem with struts2 checkbox
Questions about tx in Spring
interceptor problem in struts2
Invocation Order of Interceptors
Struts2 in Action: Book Question
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:26:54.