[jboss-dev] How to scan annotations in AS trunk?
Bill Burke
bburke at redhat.com
Thu Jun 3 19:37:18 EDT 2010
thanks
Rémy Maucherat wrote:
> 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
>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
More information about the jboss-development
mailing list