Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Sun Apr 20, 2014 5:26 pm
by evefuji
Every client either needs a permission or the method is freely accessible to all.
All JEE components such as EJBs and Servlets can make use of resource injection.
Only 1 servlet instance can response multiples requests, that no make multiples request to only unique EJB?

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Sun Apr 20, 2014 8:18 pm
by admin
I am sorry, I did not understand your question.
-Paul.

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Mon Apr 21, 2014 10:45 am
by evefuji
admin wrote:I am sorry, I did not understand your question.
-Paul.
if inject using resource injection, the injected resource not will be used to all requests responsed by this instance of servlet?

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Mon Apr 21, 2014 11:15 am
by admin
Yes, it will be used to service all requests by that instance of the servlet.

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Sat Nov 21, 2020 11:33 am
by johnlong
It must get a reference to the Queue using JNDI lookup if it is a standalone client.

Can client client a Queue manually using JMS API ?

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Sat Nov 28, 2020 11:52 pm
by admin
Not sure what you mean. To get a reference to any resource, you need JNDI lookup (or injection by the container but in a standaalone client there is no container).

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Sun Nov 29, 2020 11:51 am
by johnlong
Explanation says : "It must get a reference to the Queue using JNDI lookup if it is a standalone client."

Standalone client can create a JMS Queue or Destination object, there is no requirement to get a reference to a queue using JNDI lookup.

Code: Select all

Queue q = new Queue("my.queue");

Re: About Question enthuware.oce-ejbd.v6.2.416 :

Posted: Mon Nov 30, 2020 2:59 am
by admin
Well, first of all, Queue is an interface, so, you can't do new Queue(). Therefore, your example Queue q = new Queue("my.queue"); is wrong.

Second, the problem statement is about getting a reference to a queue. Not creating a Queue.