This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

change stateless to stateful session bean

 
James Foster
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets say I have a stateful session bean performing some business logic. Lateron, I find that I could have as well made it as stateless session bean. Do I just have to change the <session-type> to stateless? Or is there anything else I need to do?
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you used any latent state (e.g. instance variables) to hold information between method invocations you'd need to move that to a persistent store like a database.
Kyle
 
Sri Basavanahally
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, You may know that, If you change from Stateful to Stateless, any create() methods you have for stateful beans with arguments have to be changed to one create() method with no arguments for the stateless session bean.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic