• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ETS Question doubt stateless bean

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Experts/Ranchers, Please take time and reply.
 
reply
    Bookmark Topic Watch Topic
  • New Topic