geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Division of responsibilities for annotations to xml and jndi entries
Date Tue, 27 Feb 2007 01:48:50 GMT
While working on injections for jetty I ran into a problem with ejb  
annotations not indicating whether they are local or remote.  I  
solved it with a rather brute force attack of just building an  
additional ClassFinder and looking for all the ejbs.  This is really  
unpleasant because openejb has to do the same work all over again.   
After talking with David Blevins on IRC for a bit to try to  
understand the problem better I've come to the conclusion that our  
current division of responsibility between the annotation stuff Tim's  
been working on and the NamingBuilders is not very good.  Actually  
figuring out what xml is the accurate representation of an annotation  
requires deep understanding of the meaning of the annotation, not  
just a mechanical translation.  As such it should be done by the  
NamingBuilder that is part of the implementation of the system we are  
referring to.

This means that the NamingBuilders need more information that just  
the xml from the spec dd.  They also need information about the  
annotations involved and they need to be the code that modifies the  
spec dd.

IIUC Tim is working on providing an interface that provides for  
updating spec dds with additional refs.  I think that this can be  
used by NamingBuilders to add whatever xml they come up with.  I  
expect a lot of the code in EjbAnnotationHelper and  
ResourceAnnotationHelper is going to need to move to NamingBuilders.

So, I've concluded that the information in the annotations need to be  
supplied to the NamingBuilders in some form, but I don't have a clear  
idea yet about exactly what form.  I think that something like a map  
from annotation to Member might be adequate.  It might be better so  
extract the info into something more like the xml info, or it might  
be better to pass in the classes with annotations, or something else.

I expect to be thinking about this over the next day or two and  
comments and ideas are more than welcome.

david jencks

View raw message