aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes change stateless to stateful session bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "change stateless to stateful session bean" Watch "change stateless to stateful session bean" New topic
Author

change stateless to stateful session bean

James Foster
Greenhorn

Joined: Nov 04, 2003
Posts: 10
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

Joined: Aug 10, 2001
Posts: 3892
    
    5
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


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Sri Basavanahally
Ranch Hand

Joined: Oct 07, 2003
Posts: 75
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.


UP THE IRONS !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: change stateless to stateful session bean