[jboss-dev-forums] [Design of EJB 3.0] - Re: Quartz MDB integration and classloader issues
ALRubinger
do-not-reply at jboss.com
Wed Jul 29 12:36:26 EDT 2009
"jaikiran" wrote : I see that most of our current interceptors reside in ejb3-core. I guess the right place for new interceptors in the ejb3-interceptors component?
|
Nope. :)
Interceptors are aspects; they encapsulate logic that runs across the core concerns of other components. So to dump them all in the same project would be counterproductive; we'd eventually build up a tangled mess of dependencies equivalent to the old "aspects" module of the AS.
So each interceptor should get its own component with release cycle. Then they can be plugged in at will.
Also, IMO we overuse interceptors. Oftentimes we leverage them just to break code out into some other space, for instance in the InstanceInterceptors which pick out the target instance a Container should invoke. That's a required concern of the Container. We should be careful to apply interceptors as they're intended; to plug and play behaviours without affecting the overall operation of the core concern. A great example of this is Tx and Security; remove them and you've got no Tx or Security. And interceptors should not depend upon each other.
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246746#4246746
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246746
More information about the jboss-dev-forums
mailing list