[jboss-dev] How to scan annotations in AS trunk?

Rémy Maucherat remy.maucherat at gmail.com
Thu Jun 3 19:19:59 EDT 2010


On Fri, Jun 4, 2010 at 1:05 AM, Bill Burke <bburke at redhat.com> wrote:
> I was doing this:
>
>       AnnotationRepository env =
> du.getAttachment(AnnotationRepository.class);
>
>
> Within my RESTEasy deployer, but "env" is always null.  Should I be
> using a different API?  BTW, I'm augmenting a WAR.

Now, it should be:
import org.jboss.scanning.annotations.spi.AnnotationIndex;
import org.jboss.scanning.annotations.spi.AnnotationRepository;

AnnotationRepository env = unit.getAttachment(AnnotationIndex.class);

Rémy




More information about the jboss-development mailing list