Win a copy of The Java Performance Companion this week in the Performance 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: 8927
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic