Meaningless Drivel is fun!*
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes ETS Question doubt stateless bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "ETS Question doubt stateless bean" Watch "ETS Question doubt stateless bean" New topic
Author

ETS Question doubt stateless bean

Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Source: ETS (Enthuware)

Consider the following method of a stateless session bean. Which of the given options are correct regarding this method?


Options [Choose 1]
a) @PostConstruct
b) @Remove
c) business
d) DI method like setSesionContext
e) Invalid in a stateless session beam

ETS Answer: Business
I dont agree. Here is my explanation.
xxxx() method is doing a JNDI lookup on java:comp/env/jms/myQueueConnectionFactory. This lookup can be done
in PostConstruct(), PreDestroY(), Timeout callback method, business method, DI method like setSessionContext().
Hence answer is @PostConstruct,business method and DI method like setSessionContext().
Is my understanding correct?


SCJP, SCWCD, SCBCD
Deepak Jain
Ranch Hand

Joined: Aug 05, 2006
Posts: 637
Experts/Ranchers, Please take time and reply.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ETS Question doubt stateless bean