File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes How is Stateful session bean mapped to Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How is Stateful session bean mapped to Client" Watch "How is Stateful session bean mapped to Client" New topic
Author

How is Stateful session bean mapped to Client

Krishan Chauhan
Ranch Hand

Joined: Mar 12, 2008
Posts: 32
Hi,

As we know stateful session beans are extension of client. When we lookup for Stateful session bean in Client, session bean gets tied to the client. Whenever client calls a method on stateful session bean, how is it guaranteed that same stateful session instance is returned?
does client pass any information/sessionId to server to identify the session bean instance?
Also do we have to use same reference to invoke session bean method if we want the same session bean?
How server identifies that request is coming from same client or different client?


Thanks,
Krishan
ramprasad madathil
Ranch Hand

Joined: Jan 24, 2005
Posts: 489

Responses 1,2 and 5 in this post tells you how.

cheers,
ram.
Krishan Chauhan
Ranch Hand

Joined: Mar 12, 2008
Posts: 32
Thanks Ramprasad

does that mean the only way to get the same session bean instance is to cache the session bean reference on Servlet/Client.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How is Stateful session bean mapped to Client