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:



  <ejb-message-bean class="resinscratchspace.queues.UserUpdateListener">

And my code is this:

        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.

        private BlockingQueue userUpdateQueue;  

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

Thanks in advance,

resin-interest mailing list

Reply via email to