[jboss-user] [Microcontainer] - Re: How to add Annotation Plugin?

ALRubinger do-not-reply at jboss.com
Wed Dec 10 12:49:33 EST 2008


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
  |       BeanAnnotationAdapter beanAnnotationAdapter = BeanAnnotationAdapterFactory.getInstance()
  |             .getBeanAnnotationAdapter();
  |       String beanAnnotationAdapterBindName = "ejb3.BeanAnnotationAdapter";
  |       BeanMetaDataBuilder bmdb = BeanMetaDataBuilder.createBuilder(beanAnnotationAdapterBindName, beanAnnotationAdapter
  |             .getClass().getName());
  |       bmdb.addMethodInstallCallback("addAnnotationPlugin");
  |       controller.install(bmdb.getBeanMetaData(), beanAnnotationAdapter);

...course, I still gotta hardcode that "addAnnotationPlugin" method as a String... ;)

S,
ALR

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4195699#4195699

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4195699



More information about the jboss-user mailing list