On 05/25/2015 11:07 AM, Emily Jiang wrote:
Thank you Jozef! I also figured this out after I debugged the case
further and reread the javadoc. Would you recommend to create one bda
for every given class (not app class) or we should design a special
archive to hold all this kind of classes or it does not matter much?
need to honor accessibility in these archives. Therefore, for
example Integer and Long can share a single bean archive but e.g. a
different class that is not accessible from Integer and Long needs to be
put in a separate bean archive and accessibility of the classes needs to
be reflected in the BDA graph.
One option we use in WildFly for these additional bean archives is to
have a bean archive per classloader.
As for adding the bda to the graph, from my understanding, these
classes should be visible to every other classes in the deployment.
Therefore, this new bda should be accessible to all other bdas in this
Yes, it is true for this particular class. If however
loadBeanDeploymentArchive() was called for a different class (e.g. for a
class from a web archive's library jar that is not itself a bean
archive) then, as such class is not necessarily accessible from every
bean archive, neither should be the returned bean archive.
On Mon, May 25, 2015 at 6:54 AM, Jozef Hartinger <jharting(a)redhat.com
see the JavaDoc here:
Specifically, it says:
" If the deployment archive containing the given class is not
currently a bean deployment archive, it must be added to the bean
deployment archive graph and returned."
Therefore, even though the given class is not part of an existing
bean archive, it should be handled by the integrator, added to the
bean archive graph and returned from the method.
On 05/24/2015 09:58 AM, Emily Jiang wrote:
> I'm trying to run the cdi tck but got an error for the following
> In the test:
> Method: arquillianBeforeClass
> Caused by: org.jboss.weld.exceptions.IllegalStateException:
> WELD-000817: Unable to find Bean Deployment Archive for class
> ... 15 more
> It seems that Custom bean was added by an extension but the bean
> implements Bean<Integer>. Surely the java.lang.Interger should
> not be any bean archives. Can someone tell me what I might done
> wrong? Will integrator need to do something to cater for all of
> the java.x classes or Weld should handle this?
> Emily Jiang
> ejiang(a)apache.org <mailto:email@example.com>
> weld-dev mailing list
> weld-dev(a)lists.jboss.org <mailto:firstname.lastname@example.org>