I'm using Weld 1.0.1 Final. You fixed a very similar bug: <a href="https://jira.jboss.org/jira/browse/WELD-438">https://jira.jboss.org/jira/browse/WELD-438</a>. From your comment on the JIRA it sounded like the selected annotations were fixed as well but that's not the behavior I'm seeing.<div>
<br><div class="gmail_quote">On Thu, Apr 8, 2010 at 7:38 AM, Pete Muir <span dir="ltr"><<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Are you using Weld 1.0.1 - I fixed this there IIRC.<br>
<div><div></div><div class="h5"><br>
On 8 Apr 2010, at 02:45, Jordan Ganoff wrote:<br>
<br>
> I was testing out a simple idea for another JMS injection type and ran into an issue with Instance.get() and additional select annotations. The InjectionPoint of the producer lacked the additional selected annotations. I'm trying to create a TopicProducer and need to dynamically inject a topic. When the topic producer is invoked the InjectionPoint does not contain the JmsDestination (the annotations are only @Inject and @Any, which seems like @Inject shouldn't be there either). Is there a better way to do this?<br>
><br>
> Here's the code:<br>
><br>
> @Inject @Any Instance<Topic> anyTopic;<br>
><br>
> @Produces @JmsDestination<br>
> public TopicPublisher createTopicProducer(InjectionPoint ip, Session s) throws JMSException<br>
> {<br>
> Topic t = anyTopic.select(ip.getAnnotated().getAnnotation(JmsDestination.class)).get();<br>
> return TopicPublisher.class.cast(s.createProducer(t));<br>
> }<br>
><br>
> ...<br>
><br>
> @Produces<br>
> @JmsDestination<br>
> public Topic getTopic(InjectionPoint ip, @Module Context c) throws NamingException<br>
> {<br>
> JmsDestination d = ip.getAnnotated().getAnnotation(JmsDestination.class);<br>
> return (Topic) c.lookup(d.jndiName());<br>
> }<br>
><br>
> Thanks in advance.<br>
><br>
> P.S. Actual code links:<br>
><br>
> <a href="http://gist.github.com/359673" target="_blank">http://gist.github.com/359673</a><br>
> <a href="http://github.com/jganoff/seam3-jms/blob/master/src/main/java/org/jboss/seam/jms/impl/inject/DestinationProducer.java" target="_blank">http://github.com/jganoff/seam3-jms/blob/master/src/main/java/org/jboss/seam/jms/impl/inject/DestinationProducer.java</a><br>
> --<br>
> Jordan Ganoff<br>
</div></div>> _______________________________________________<br>
> weld-dev mailing list<br>
> <a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>Jordan Ganoff<br>
</div>