By simply specifying this in my code, how do I know which JMS queue I am referring to .@Resource
private Queue omQueue;
I had to specify @Resource with name attribute only . Please correct me if I am missing something here ?
Moderator: admin
By simply specifying this in my code, how do I know which JMS queue I am referring to .@Resource
private Queue omQueue;
Well, it depends on the container. Generally, the objects are injected based on their type. In case of JMS destinations, if the container is unable to figure out, it might prevent deployment or it might hookup with an object that you don't want.rkbansal83 wrote:I did not get what do you mean when you said "most suitable object" ?
We can have any number of JMS queues present on JMS provider , how does the EJB container decide the suitability . Please elaborate ?
Also , Can you please tell me if any such thing is specified in EJB specfications ?
There is an EJB programming restriction that we should not use declare static field, except static final field.@Resource(name="OrderManagerQueue")
public static Queue omQueue
So we can not use static for a queue inject but we can use static for @EJB injection?
Users browsing this forum: No registered users and 98 guests