[weld-dev] Instance, @Produces, and InjectionPoint

Jordan Ganoff jganoff at gmail.com
Sun Feb 14 23:39:23 EST 2010


The InjectionPoint passed to the producer method as a result of calling
Instance.get() returns null for getAnnotated(), getBean(),getMember(), and
has no qualifiers (regardless of whether the declaration defined them or
not).  Is this the intended behavior when injecting Instances for
programmatic lookup via Instance.get()?

I'm using Arquillian's jboss-remote-60 profile and haven't had any problems
other than with Instance thus far.  Here's a sample of what I'm talking
about:

Test.java:
@Inject @Destination Instance<Topic> t;

@Test
public void testInjection()
{
   assertNotNull(t.get());
}


TopicProducer.java:
@Produces @Destination
public Topic getTopic(InjectionPoint ip) { ... }


-- 
Jordan Ganoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/weld-dev/attachments/20100214/0e68ae13/attachment.html 


More information about the weld-dev mailing list