This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes create in Stateful SB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "create in Stateful SB" Watch "create in Stateful SB" New topic
Author

create in Stateful SB

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi
In Stateless SB we need to have only 1 create no args method.
Suppose now in the DD i change this particular bean type from stateless to stateful. will it work . Now since there are no args in the create how will the app server maintain the state

Rgrds
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1064
Originally posted by manish ahuja:
In Stateless SB we need to have only 1 create no args method.
Suppose now in the DD i change this particular bean type from stateless to stateful. will it work . Now since there are no args in the create how will the app server maintain the state.

The client-specific state of a SFSB is maintained by the member variables present in the bean class. If you do not pass the state information while creating the bean, then you can pass the information in the subsequent business methods that are called by the client. This state will remain valid and attached to this specific client through out the communication.
Normally, as part of the SFSB create() method, we pass the client state information. This is one of the reasons why SFSB have overloaded create() methods.
 
Consider Paul's rocket mass heater.
 
subject: create in Stateful SB
 
Similar Threads
Difference between Remote & Local
Stateful session bean applications.
Session Beans
Stateless session bean and transaction question
Can stateless session bean acess UserTransaction in ejbCreate and ejbRemove