anonymous wrote : Perhaps all we need is getAccessibleBDAs on BDA?
There are two differences between Deployment and BeanDeploymentArchive.
First is to allow representing both EAR and WAR. Whilst it would be sensible to represent
a WAR as a BDA, it wouldn't make sense to represent an EAR as a BDA (it doesn't
have any classes in it, it doesn't have any beans.xml in it).
Second is that Deployment supports loadBeanDeploymentArchive which allows Web Beans to
discover which BDA any class in the classpath is in.
For example, take an archive (not CDI enabled) like:
foo.jar
- Foo.class
some user might, using a CDI API, add a custom Bean to application which uses Foo as
it's "beanClass". At this point WB needs to know where Foo fits into the
accessibility graph, and hence which EE modules can load it. At this point WB will call
loadBeanDeploymentArchive(Foo.class) so it can associate the custom bean with it's
accessiblity rules. It's further complicated by the fact that the BDA returned at this
point wasn't previously a BDA, so needs adding into the accessibility hierarchy (so WB
will re-request the entire graph after the deployment phase in which users can add
beans).
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246245#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...