I'm developing a sample to test a few things and I have a simple
question about injecting a Queue by name.

I have a bit of xml in my resin-web.xml config like this:

  <jms:JmsConnectionFactory/>

  <jms:FileQueue>
    <Named>userUpdates</Named>
  </jms:FileQueue>

  <ejb-message-bean class="resinscratchspace.queues.UserUpdateListener">
    <destination>#{userUpdates}</destination>
  </ejb-message-bean>

And my code is this:

        @Current
        private BlockingQueue userUpdateQueue;  


And everything is fine, but if I add another Queue (in resin-web.xml)
then I get a problem as I have more than one Queue and it is not
unique for injection. Now, in the examples it shows using
@Named("QueueName") but that annotation cannot be applied to a field
as the example seems to indicate.

        @Named("userUpdates")
        private BlockingQueue userUpdateQueue;  

How do I differentiate between the queues in my injection annotations?

Thanks in advance,
Scott


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to