This bit:
bean name=AnnotationHandlerFactory
| constructor
factoryClass=org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory
factoryMethod=getInstance /
|/bean
|bean name=AnnotationHandler
| constructor factoryMethod=getBeanAnnotationAdapter
|
trustin wrote :
| If it modifies MC's global behavior, then I think it should be part of MC.
Otherwise each 3rd party integration module will end up with trying to add the
same annotation plugin. Or... I might be missing something. ;-)
I don't think this should be made directly into MC
Thanks ALR for sharing your code: http://tinyurl.com/7wjv78
Are the callbacks called only when an installed AnnotationPlugin is described
in the same deployment, or are they called regardless of whether the installed
plugins are described in a different deployment (i.e. different JAR /
Just for the record, here's ALR's blog post which explains this topic more in
detail: http://tinyurl.com/9wwgx7
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=4201112#4201112
Reply to the post :
trustin wrote : Thanks ALR for sharing your code: http://tinyurl.com/7wjv78
|
| I put it out there just hoping you'd find it. :)
|
| Are the callbacks called only when an installed AnnotationPlugin is
described in the same deployment, or are they called regardless of whether the
ALRubinger wrote : The callbacks are added for any deployment under the same
Controller
So beware, you're actually altering MC's behaviour. I believe Ales made some
mention of considering whether these callbacks should be made by default (so
this bit wouldn't be needed)?
S,
ALR
View the
ALRubinger wrote : ALRubinger wrote : The callbacks are added for any
deployment under the same Controller
| So beware, you're actually altering MC's behaviour. I believe Ales made
some mention of considering whether these callbacks should be made by default
(so this bit wouldn't be needed)?
alr wrote : Is there a better way where this approach may be avoided?
Register BeanAnnotationAdapter singleton instance as MC bean.
Then add its add/remove plugin methods as callbacks.
And register your custom EJB plugin as MC bean as well.
It will be then auto-magically :-) picked up by BAA.
Yes, was hoping for this auto-registration much like is done when installing a
KernelRegistryPlugin (ie. picks up the interface and takes appropriate action).
So the following works:
// Install the BeanAnnotationAdapter w/ callback to add annotation
plugins on install
|