13 Replies Latest reply on Apr 7, 2010 8:53 AM by Nicklas Karlsson

    specifying bean classes at weld boot

    fiorenzo pizza Newbie

      i'm trying to use weld with very huge old web application (more than 4000 classes).

      Problem is that at bootstrap time, weld starts consuming more and more memory
      till I get the following message:

      java.lang.OutOfMemoryError: Java heap space
           at com.google.common.collect.Multimaps.newSetMultimap(Multimaps.java:248)
           at org.jboss.weld.introspector.AnnotationStore.<init>(AnnotationStore.java:183)
           at org.jboss.weld.introspector.AnnotationStore.of(AnnotationStore.java:108)

      Is there a way to specify the only beans I want Weld to scan?

      Is it possible, for instance, to write something into beans.xml to
      specify which packages or classes to scan?

      Thanks in advance,