• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Retrieving Stateful Session Bean

 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I was just wondering how I retrieve a Stateful Session Bean. I thought I could retrieve it using

ShoppingRemote cart = cartHome.create(userName);

However, when I do this I've lost the contents of my bean.

Can anyone help?

Thanks

Richard
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Store the remote reference in HttpSession or serialize it into a file or in a database ...The storage logic should enable the retrieval of the specific stateful sess bean at a later point of time ... Later retrieve the remote reference from the storage location and invoke.
 
Rik Sweeney
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by karthi keyan:
Store the remote reference in HttpSession or serialize it into a file or in a database ...The storage logic should enable the retrieval of the specific stateful sess bean at a later point of time ... Later retrieve the remote reference from the storage location and invoke.


Thanks, I'll give it a try
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Huh? HttpSession? Is this Servlets or EJB?

Mark
 
karthikeyan Chockalingam
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Huh? HttpSession? Is this Servlets or EJB?


Incase the client for the EJB has access to HttpSession and the subsequent calls to the stateful session EJB happens with reference to the same HttpSession and we consider its reasonable to store in HttpSession ........
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic