<div class="gmail_quote">On Fri, Apr 9, 2010 at 5:09 AM, Pete Muir <span dir="ltr"><<a href="mailto:pmuir@redhat.com" target="_blank">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">
Hi Jordan,<br>
<br>
I don't quite understand what you are doing, but I do wonder why you are making the topic definition a qualifier at all. IMO it is simpler to just treat the topic annotation a normal annotation, meta annotated with @JmsDestination. You can then use the injection point metadata to query the annotation and find out the destination name.<br>
<br>
WDYT?<br></blockquote><div><br></div><div>That's a much cleaner way to handle it. The reason I went with qualifiers is to require them on all injection points that had to look up a topic or queue (injection of Topic, Queue, MessageProducer/MessageConsumer). That way it was clear which destination was being used and from where instead of inferring the name from the InjectionPoint.Annotated. I suppose observing ProcessInjectionTarget and adding definition errors for missing annotations would work.</div>
<div><br></div><div>The other issue is that I would like to be able to support programmatic lookup via Instance.select(...). That requires the annotations be qualifiers. </div><div><br></div><div>Just brainstorming here... If they were qualifiers I'd need some way of creating unique producers for each declared one. I could dynamically create producer beans during start up for each identified qualifier. That seems like it's more work than should be necessary. If I were able to define some sort of generic qualifier that could be used to fulfill the injection request I wouldn't have to worry about creating beans.</div>
<div><br></div><div>--</div><div>Jordan</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Pete<br>
<div><div></div><div><br>
On 7 Apr 2010, at 13:30, Jordan Ganoff wrote:<br>
<br>
> All,<br>
><br>
> I'd like some feedback on how I've implemented JMS destination injection. For reference see the design notes at <a href="http://sfwk.org/Seam3/JMSModule" target="_blank">http://sfwk.org/Seam3/JMSModule</a>.<br>
><br>
> Generic destination injection is realized by decorating the AnnotatedTypes which define any transitive annotations of @JmsDestination. The annotations are replaced with the defined @JmsDestination and a simple pair of producer methods handle their production (<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>). Although this works it removes the annotations. I'd much prefer another solution which leaves all annotations intact and somehow provides producers for each (if not already defined).<br>
><br>
> Any thoughts on the matter would be greatly appreciated. Am I correct in assuming the original annotations should be preserved?<br>
><br>
> Code base is currently on github until the svn repo is set up: <a href="http://github.com/jganoff/seam3-jms" target="_blank">http://github.com/jganoff/seam3-jms</a><br>
> Relevant test cases are here: <a href="http://github.com/jganoff/seam3-jms/tree/master/src/test/java/org/jboss/seam/jms/test/inject/" target="_blank">http://github.com/jganoff/seam3-jms/tree/master/src/test/java/org/jboss/seam/jms/test/inject/</a><br>
><br>
> Thanks!<br>
><br>
> --<br>
> Jordan Ganoff<br>
</div></div>> _______________________________________________<br>
> seam-dev mailing list<br>
> <a href="mailto:seam-dev@lists.jboss.org" target="_blank">seam-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br><br></blockquote></div>