About Question enthuware.oce-ejbd.v6.2.492 :
Moderator: admin
-
- Posts: 22
- Joined: Thu Jul 25, 2013 3:39 pm
- Contact:
About Question enthuware.oce-ejbd.v6.2.492 :
IMHO the Stateless bean does not have to implement the setSessionContext method.
If this is correct then the container needs to call only:
constructor, postConstruct, bussinesMethod and preDestroy.
My test claims that the upper listed method flow is wrong but I think it is not.
Best Regards,
Mihai
If this is correct then the container needs to call only:
constructor, postConstruct, bussinesMethod and preDestroy.
My test claims that the upper listed method flow is wrong but I think it is not.
Best Regards,
Mihai
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Actually, a bean does not need to implement @PostConstruct or @PreDestroy either. But the question is just trying to illustrate the sequence of all these calls assuming the bean has these methods.
HTH,
Paul.
HTH,
Paul.
-
- Posts: 22
- Joined: Thu Jul 25, 2013 3:39 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
I agree with you and the question is good because it make you think over the entire methods flow.
On the other side the "setSessionContext" is a 2.1 remaining
.
On the other side the "setSessionContext" is a 2.1 remaining

-
- Posts: 7
- Joined: Sat Feb 08, 2014 8:30 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Hi,
keeping the options given in mind, following order should also be a valid answer to this question:
@PostConstruct
businessMethod
@prePassivate
@postActivate
@preDestroy
Choices given contains @prePassivate and @postActivate and not ejbActivate and ejbPassivate as given in the explanation.Remember that a stateless session bean does not have ejbActivate and ejbPassivate methods.
keeping the options given in mind, following order should also be a valid answer to this question:
@PostConstruct
businessMethod
@prePassivate
@postActivate
@preDestroy
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
ejbActivate/ejbPassivate are same as @PostActivate/@PrePassivate. ejbActivate/ejbPassivate methods are declared in SessionBean interface and are invoked by the container upon activation/passivate of a bean that implements SessionBean interface, while the @PostActivate/@PrePassivate are annotations meant for the same purpose.
As noted in the explanation, a Stateless Session bean does not have these methods. So the order you've mentioned is wrong.
HTH,
Paul.
As noted in the explanation, a Stateless Session bean does not have these methods. So the order you've mentioned is wrong.
HTH,
Paul.
-
- Posts: 7
- Joined: Sat Feb 08, 2014 8:30 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Thanks Paul. It was kind of stupid on my part to ask this question as I failed to notice the session bean type itself (stateless in the case).
Thanks.
Thanks.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
I am not getting show correct answer option in DnD pop-up screen.
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
If you are in a test, it will be enabled after you finish the test. If not, you need to click on Evaluate first.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
It is not showing after evaluation.
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Please follow these steps.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Please see my screenshot.
- Attachments
-
- Screen Shot 2017-06-03 at 08.39.06.png (217.46 KiB) Viewed 13584 times
-
- Site Admin
- Posts: 10385
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
I have made some change to this question to fix the issue.
Could you please download the updated version of the question bank from http://enthuware.com/downloads/ejbplusv6.ets ?
thank you,
Paul.
Could you please download the updated version of the question bank from http://enthuware.com/downloads/ejbplusv6.ets ?
thank you,
Paul.
-
- Posts: 197
- Joined: Mon Jun 20, 2016 5:06 pm
- Contact:
Re: About Question enthuware.oce-ejbd.v6.2.492 :
Will do, thanks.
Who is online
Users browsing this forum: No registered users and 6 guests