[jboss-dev-forums] [Design of POJO Server] - Re: Instance annotations from Object Models
adrian@jboss.org
do-not-reply at jboss.com
Tue Oct 23 09:32:38 EDT 2007
Since Carlo and Bill said they thought this complicated
(the test is complicated to get things working in a similar way to EJB3 :-)
This post just explains that the only real change is to replace EJB3's use
of AOP's AnnotationRepository
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/aop/trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java?revision=63589&view=markup
with the MetaDataRepository's MutableMetaDataLoader
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/container/src/main/org/jboss/metadata/spi/loader/MutableMetaDataLoader.java?revision=55064&view=markup
which is made up of the following interfaces
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/container/src/main/org/jboss/metadata/spi/MutableMetaData.java?revision=60565&view=markup
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/microcontainer/trunk/container/src/main/org/jboss/metadata/spi/retrieval/MetaDataRetrieval.java?revision=65047&view=markup
AOP Supports both. The big difference is that the MetaDataRepository uses many scopes.
e.g. you can annotations at Class, Instance (XML), Application, Deployment, etc.
and supports non-annotations.
To explain the later, take the SecurityDomain in EJB2 as an example.
There can be a Deployment level one at the top of jboss.xml, it could potentially
be annotated on the class (it's not currently in EJB2)
and finally it can appear at the EJB level (instance) in jboss.xml.
With the MetaDataRepository scopes, it would be trivial to extend this to provide
a Server level SecurityDomain. i.e. every EJB uses a default security domain
unless it specifies otherwise.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097889#4097889
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097889
More information about the jboss-dev-forums
mailing list