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.
About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :
Moderators: Site Manager, fjwalraven
About Question enthuware.oce-ejbd.v6.2.389 and enthuware.oce-ejbd.v6.2.391 :
Last edited by admin on Mon Jun 18, 2012 6:06 am, edited 1 time in total.
Reason: Added 2.391 to the subject.
Reason: Added 2.391 to the subject.
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.389 :
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.
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.
-
- 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 :
The explanation of question 2.389 is that two instances of interceptor classes will be created:
Thanks
Fred
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?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.
Thanks
Fred
-
- 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 :
You are right. This has now been fixed.
thank you for your feedback!
thank you for your feedback!
Who is online
Users browsing this forum: No registered users and 3 guests