• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Declaration of a session bean

 
PNS Subramanian
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
During the development of a stateless session bean - how different would the application behaviour be, if the session bean gets declared as Stateful in the deployment descriptor ? Apart from a performance hit, would there be any side effects. I dont see much myself - but would like to know if this is correct indeed.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34669
367
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends on how you think of the bean during development. If you develop it to be stateless, there wouldn't be any side effects other than performance (and the fact that you could run out of beans) because you wouldn't be storing any data in the bean. Of course, it wouldn't accomplish anything either.

If you develop it to be stateful, you will have a lot of problems because the data will be shared in unpredictable ways.
 
PNS Subramanian
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic