• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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: 5006
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.
 
Curse your sudden but inevitable betrayal! And this tiny ad too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic