Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stateless session bean doubt

 
Krishna Latha Grandhi
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In EJB2.0 spec page no.44 they mentioned

Each EJB object lives in a home, and has a unique identity within its home. For session beans, the Container
is responsible for generating a new unique identifier for each session object.

I have a doubt that Whether For Statless Session Beans, the container maintains unique identifier for each one.. or not...
If yes.. How can we get true when checking two stateless session bean EJBObjects by isIdentical() method..

Please Clarify...

Thanks
Hari Krishna.
 
Pavel Kubal
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iIdentical() returns true for two stateless beans comming from the same home
 
Rohan Kayan
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you are getting confused in Stateless Session Bean onject and EJBObject , all the EJBOjects are unique but not the bean objects.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, the container keeps track of them, even if they are stateless session beans.

-Cameron McKenzie
 
Krishna Latha Grandhi
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I got the answer, in the same specs itself...

A stateful session object has a unique identity that is assigned by the container at create time.

All session objects of the same stateless session bean within the same home have the same object identity,
which is assigned by the container.

I think in 44th page they mentioned only about stateful session beans...

Thank you...

Regards,
Hari krishna.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic