Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Stateless beans allowed operations

 
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the container decides to create a new statless bean, it invokes the beans constructor, setSessionContext() method, and finally the ejbCreate() method, then places the bean in the pool for this bean type. At this point (creation), the bean is NOT tied to any EJBObject, so why is it that we're allowed to invoke getEJBObject() and getEJBLocalObject() in the ejbCreate method?

Regards.
 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For session beans, stateless beans are not tied to an EJBObject at the time ejbCreate() is called. Hoever, an EJBObject exists for that type of stateless bean. Take a look at the Object interaction diagram in HFEJB, page 227. At time of creation, there exists an EJBObject for your statless bean, however it's not tied to a particular client.

Hope that answered your question.
[ May 30, 2006: Message edited by: Michael Valentino ]
 
You get good luck from rubbing the belly of a tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic