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

Moderator: admin

Post Reply
mopuffus
Posts: 22
Joined: Thu Jul 25, 2013 3:39 pm
Contact:

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

Post by mopuffus » Mon Aug 12, 2013 10:49 am

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

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

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

Post by admin » Tue Aug 13, 2013 6:43 pm

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

mopuffus
Posts: 22
Joined: Thu Jul 25, 2013 3:39 pm
Contact:

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

Post by mopuffus » Wed Aug 14, 2013 11:07 am

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 :).

vinkjrwl
Posts: 7
Joined: Sat Feb 08, 2014 8:30 pm
Contact:

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

Post by vinkjrwl » Thu Feb 20, 2014 9:19 pm

Hi,
Remember that a stateless session bean does not have ejbActivate and ejbPassivate methods.
Choices given contains @prePassivate and @postActivate and not ejbActivate and ejbPassivate as given in the explanation.

keeping the options given in mind, following order should also be a valid answer to this question:

@PostConstruct
businessMethod
@prePassivate
@postActivate
@preDestroy

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

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

Post by admin » Thu Feb 20, 2014 10:40 pm

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

vinkjrwl
Posts: 7
Joined: Sat Feb 08, 2014 8:30 pm
Contact:

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

Post by vinkjrwl » Fri Feb 21, 2014 2:30 am

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.

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

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

Post by johnlong » Thu Jun 01, 2017 12:37 pm

I am not getting show correct answer option in DnD pop-up screen.

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

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

Post by admin » Thu Jun 01, 2017 12:43 pm

If you are in a test, it will be enabled after you finish the test. If not, you need to click on Evaluate first.
If you like our products and services, please help us by posting your review here.

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

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

Post by johnlong » Fri Jun 02, 2017 10:02 am

It is not showing after evaluation.

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

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

Post by admin » Fri Jun 02, 2017 10:20 am

Please follow these steps.
test1.png
test1.png (26.26 KiB) Viewed 3952 times
If you like our products and services, please help us by posting your review here.

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

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

Post by johnlong » Sat Jun 03, 2017 7:55 am

Please see my screenshot.
Attachments
Screen Shot 2017-06-03 at 08.39.06.png
Screen Shot 2017-06-03 at 08.39.06.png (217.46 KiB) Viewed 2759 times

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

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

Post by admin » Sat Jun 03, 2017 10:13 pm

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

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

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

Post by johnlong » Sat Jun 10, 2017 8:45 am

Will do, thanks.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests