[jboss-dev-forums] [Design the new POJO MicroContainer] - Annotation features

alesj do-not-reply at jboss.com
Tue Jul 17 09:49:37 EDT 2007


Since there is a really increasing demand for annotation usage with MC configuration, I think we should _finally_ provide a generic MC beans annotations handling.

There are already some annotations present, but I think their lookup is scattered all over the place.

I also went through some old posts which just touch on the topic of annotations:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=89400
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=88620&postdays=0&postorder=asc&start=0
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=88613&postdays=0&postorder=asc&start=0

There are some pointers to use the ClassInfo/BeanInfo:
anonymous wrote : 
  | The inspection should come from "reflection abstraction"
  | in the container module which is integrated via the
  | Configurator/BeanInfo. 

But is looks like this is not yet fully implemented:
anonymous wrote : 
  | Which AFAIK, (Kabir may know better) isn't properly integrated
  | except when AOP is used. i.e. The Bean/ClassInfo is not updated
  | with the annotation overrides.
  | 

Regarding the scattering:

1) I've started with a simple annotation handling with AnnotationDependencyBuilder and DependencyFactory(Lookup), but this is not yet enabled - DependencyBuilder is not pluged in.
There was a question about using a chain of DependencyBuilders, but that's where it stopped.
 - http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107268

2) But on the other hand I'm doing a whole annotation lookup through MetaDataRepository in PreInstallAction.

3) And I do a straight annotation lookup via BeanInfo in LifecycleAction.

I like the AnnotationDependencyBuilder with DependencyFactory approach - ok, some weak caching is missing and some other features - but if we are able to provide a generic annotation handling that way ...

I guess some of the actual annotation handling will/is depending on the ControllerState we are in - specially regarding classes being present and actual bean instantiation with beanfactory.
Perhaps doing DependencyBuilders depending on the state?

Is changing the BeanMetaData legal when handling annotations?
Or we need to do the cloning before this? 

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

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



More information about the jboss-dev-forums mailing list