• 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

ejbcertificate.com question

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following only apply to stateless session beans?

1 Only one create method can be defined in the session bean's home interface.
2 The container controls the lifecycle of the session bean.
3 The container calls the bean instance's setSessionContext method to pass a reference to a session context interface to store for future use.
4 Each session bean instance is associated with a single client.
5 A transaction can span multiple business method invocations.

I thought 1,2,3. But it says 1 & 2 only.
Please correct me if i am wrong.
Thanks
 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think you are right,Answers 1,2,3 are correct.

Regards,

James
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following only apply to stateless session beans?

Pay more attention to the ques, it ask about stateless session beans ONLY.

ans 3 is applicable to both stateless and stateful.
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As answered by Giju, third point is applicable for both the stateless and statefull beans, hence could not be part of the answer.
 
james edwin
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Giju/Narasimha,

But client never calls "setSessionContext()" method directly.It always called by container.

Quote
"
The container instantiates the bean using the newInstance method and then calls the methods setSessionContext and ejbCreate. The container also sets the transaction context and security attributes (as set in the deployment descriptor). Now the bean is ready to serve any client.
"
Unquote

Above session was taken from stateless session bean only.

Cheers !!!

James
[ September 02, 2004: Message edited by: james edwin ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic