• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Stateful Session Beans

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 2713
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 8944
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic