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

Moderator: admin

Post Reply
evefuji
Posts: 21
Joined: Fri Apr 11, 2014 8:57 pm
Contact:

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

Post 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?

admin
Site Admin
Posts: 9412
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

I am sorry, I did not understand your question.
-Paul.
If you like our products and services, please help us by posting your review here.

evefuji
Posts: 21
Joined: Fri Apr 11, 2014 8:57 pm
Contact:

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

Post 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?

admin
Site Admin
Posts: 9412
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

Yes, it will be used to service all requests by that instance of the servlet.
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post 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 ?

admin
Site Admin
Posts: 9412
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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).
If you like our products and services, please help us by posting your review here.

johnlong
Posts: 197
Joined: Mon Jun 20, 2016 5:06 pm
Contact:

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

Post 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");

admin
Site Admin
Posts: 9412
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest