This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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
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.
 
wood burning stoves
 
subject: create in Stateful SB