I found a problem with using annotations in a hierarchy
(or any "collection" metadata for that matter).
Let's suppose you have an EJB annotated with
@Resources(@Resource(name="jms/Queue", type=Queue.class
mappedName="queue/SomeQueue");
Then at the deployment level you've specified your datasource:
@Resources(@Resource(name="jdbc/DataSoure", type=DataSource.class
mappedName="java:/DefaultDS");
Then the EJB (class level) annotation hides the deployment level annotation.
Resources resources = MetaData.getAnnotation(Resources.class);
What is really required is for this data to merged.
But obviously, it is only these collection type annotations that
should be merged to get the final result. And even then not all of them.
e.g. a hypothetical @Descriptions annotation on the deployment
and an ejb's resource ref should not be merged.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977319#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...