Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is Specification not reasonable on this point?

 
hover cheng
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, all
I could not understand one point in "7.8.2 Operations allowed in the methods of a stateless session bean class", EJB Spec 2.0. In "table 3", it illustrates that "getEJBObject" and "getEJBLocalObject" are permitted in "ejbCreate" and "ejbRemove" methods.
As we know, for stateless session bean, the ejbCreate and ejbRemove are called by the container, on the time when the bean is in pool state and is NOT associated with any EJBObject/EJBLocalObject. So, how can we get a valid EJBObject/EJBLocalObject reference in "ejbCreate" and "ejbRemove"?
Could anyone give me a comment? Thanks.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As we know, for stateless session bean, the ejbCreate and ejbRemove are called by the container, on the time when the bean is in pool state and is NOT associated with any EJBObject/EJBLocalObject. So, how can we get a valid EJBObject/EJBLocalObject reference in "ejbCreate" and "ejbRemove"?

Just read the OID in page 92 of the spec.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!