wood burning stoves 2.0*
The moose likes EJB and other Java EE Technologies and the fly likes Retrieving Stateful Session Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Retrieving Stateful Session Bean" Watch "Retrieving Stateful Session Bean" New topic
Author

Retrieving Stateful Session Bean

Rik Sweeney
Ranch Hand

Joined: Sep 04, 2001
Posts: 36
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

Joined: Sep 06, 2003
Posts: 259
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.


http://www.skillassert.com


Rik Sweeney
Ranch Hand

Joined: Sep 04, 2001
Posts: 36
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

Joined: Feb 05, 2001
Posts: 17249
    
    6

Huh? HttpSession? Is this Servlets or EJB?

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
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 ........
 
Consider Paul's rocket mass heater.
 
subject: Retrieving Stateful Session Bean
 
Similar Threads
Amusing...
Stateful Session Bean question
Stateful Session Bean
isIdentical
how to handle session in EJB