About Question enthuware.oce-ejbd.v6.2.356 :
Moderator: admin
About Question enthuware.oce-ejbd.v6.2.356 :
So by the explanation, if it was a stateless bean, the answer will be the same?
-
- Site Admin
- Posts: 10072
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.356 :
No, as the explanation says, for a stateless bean it is possible that a container has multiple instances of the bean. But that is not guaranteed. So for a stateless bean, the answer will depend on how may instances are there and which instance is used to service the method calls.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 358
- Joined: Fri Nov 29, 2013 8:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.356 :
If the next question is for stateless bean,
3 possible answers:
1) r1.getData () and r2.getData() will be B A if r1 and r2 are two different instances.
2) r1.getData() and r2.getData() will be B B if r1 and r2 are refering to the same instance.
3) r1.getData() returns B while r2.getData() may return something else if r2 is an existing instance which has data set to something else by another client.
3 possible answers:
1) r1.getData () and r2.getData() will be B A if r1 and r2 are two different instances.
2) r1.getData() and r2.getData() will be B B if r1 and r2 are refering to the same instance.
3) r1.getData() returns B while r2.getData() may return something else if r2 is an existing instance which has data set to something else by another client.
-
- Posts: 15
- Joined: Tue Apr 21, 2015 1:36 am
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.356 :
These beans expose remote interfaces or not? the names indicate they are remote so the call r1.setData("B"); will have no effect over r1 reference, so they will both print A A
It is true that nowhere is shown @Remote annotations, so we should consider them local beans?
thanks!
It is true that nowhere is shown @Remote annotations, so we should consider them local beans?
thanks!
-
- Site Admin
- Posts: 10072
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.356 :
Whether the beans are remote or local is irrelevant here. In both the cases the answer will be B, A (not A, A) as explained in the explanation.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 9 guests