• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

stateless session bean doubt

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
iIdentical() returns true for two stateless beans comming from the same home
 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic