About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :

Post by ETS User »

Hello,

In the question of the Quik diagnostic test:
You have associated an interceptor class with a stateless session bean method. If this method is called once by two different clients, how many instances of the interceptor class will be created?

- it is explain that the right answer is ----- "Can´t say "


On the Test 4, the last question:

You have associated an interceptor class containing an AroundInvoke method with a stateless session bean method. If this method is called once by two different clients, how many distinct instances of the interceptor class will be used to service these two calls?

- here it is explain that the right answer is ------- "1 or 2"


Please explain way not the same answer on both questions.
Thanks a lot.
Last edited by admin on Mon Jun 18, 2012 6:06 am, edited 1 time in total.
Reason: Added 2.391 to the subject.

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

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

Post by admin »

The answers are different because if you read both the questions carefully, you will notice that 2.389 asks how many instances will be created, and the answer is can't say because that depends on how many instances of the bean are created by the container (because of pooling). A container could any number of instances of a stateless session bean.

While 2.391 asks, how many instances will be used. In this case, the answer is 1 or 2 depending which instance the method calls are routed to. Since there are two calls made, at most 2 different instances can be used.

HTH,
Paul.

fred flintstone
Posts: 2
Joined: Sat Jun 22, 2013 12:43 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :

Post by fred flintstone »

The explanation of question 2.389 is that two instances of interceptor classes will be created:
The life cycle of an interceptor is same as that of the bean. One unique instance of interceptor is associated with one unique instance of a bean. Interceptor instances are not shared among the bean instances. Since instances of a stateful sessions beans are never shared (each client gets its own instance), there will be two instances of interceptor class as well.
It is comprehensible that there will be two instances of interceptor classes, because the question refers to stateful session beans. But the correct answer is "Can't say". Isn't it a contradiction?

Thanks
Fred

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

Re: About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :

Post by admin »

You are right. This has now been fixed.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests