• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateful Session Beans

 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
We say stateful session beans span over multi method calls .Stateful session beans keep a track of history.
Our Http protocol is stateless which is used by EJB client, then how do application server keeps track of stateful method calls?
Thanks
Vikas
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You make EJB calls using RMI-IIOP and not HTTP even though in some cases you may have to HTTP tunnleling.
The stub know which object to call at the EJB server, which may maintain the state.
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pardeep
Please let me know how do stubs maintains state of bean(stateless or stateful).As per my knowledge stub only knows how to make a call and how to send data remotely.
thanks
Vikas
Originally posted by Pradeep Bhat:
You make EJB calls using RMI-IIOP and not HTTP even though in some cases you may have to HTTP tunnleling.
The stub know which object to call at the EJB server, which may maintain the state.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stubs do not store the state. They know how to make call to the appropriate object in the server and the server object stores the state.
Hope this helps!
 
vikasids sharma
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thatz fine that vendor specific EJB Object provides state Management to bean instances.
but i still could not understand why HTTP is not in picture when a remote client calls EJB.Please clarify little more....
Originally posted by Pradeep Bhat:
Stubs do not store the state. They know how to make call to the appropriate object in the server and the server object stores the state.
Hope this helps!
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The protocol used is RMI-IIOP.
The container manages the lifecycle of stateful session bean.
[ September 12, 2003: Message edited by: Pradeep Bhat ]
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why should it matter what protocol the client is communicating over? The session state for a SFSB is stored on the server and is independent of the client. Therefore, the only thing the client must remember is which bean they were talking to. This is typically addressed in web clients by storing the Handle for the SFSB in the user's HttpSession.
I am not exactly sure where your confusion is coming from...
[ September 12, 2003: Message edited by: Chris Mathews ]
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
I think the confusion is because of this:

HTTP is stateless protocol and SFSB store conversational state. One is stateless and another is stateful.

I feel that we have already answered his query.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!