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

Doubt about state of Stateless Session Bean

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have any doubt about Stateless Session Bean:
This type of EJB prove generic services and can cached state ?
This EJB keep a conversation state behalf of several clients ?
I thanks the help me.
Haroldo
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

This EJB keep a conversation state behalf of several clients ?


No it doesn't.
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A stateless session bean's interface provides methods of which result is not dependent on who the caller is. Thus, they are suitable for "generic services".
Stateless session beans can be used for caching data and maintaining state for multiple clients but that is an area where you'd usually like to stay away from. The catch is that there are no guarantees regarding which bean instance serves which request and the multiple-JVM possibility makes your life even harder if you're trying to use static fields for storing the data. Eventually, you'd have to store the data into a database (not really caching anymore, is it...) or switch to using an entity bean for the clients' state.
reply
    Bookmark Topic Watch Topic
  • New Topic