Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

create in Stateful SB

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic