• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Retrieving Stateful Session Bean

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 259
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ........
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic