Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Statefule session Bean  RSS feed

 
Sanny kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Can you please tell me how state is maintained in stateful session bean?

Whether Transaction attributes involved in Session bean / not?

Thanks in advance
Santhosh
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36396
453
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Santhosh,
State is stored in the bean as attributes.

Transactions are present if you put those settings in the deployment descriptor.
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sanny kumar:
Hi Guys,

Can you please tell me how state is maintained in stateful session bean?

Whether Transaction attributes involved in Session bean / not?

Thanks in advance
Santhosh


State will be stored in the instance variable of the bean class and as a single bean is associated with a client till the time client removes.So the state variables are only for that clients use only.

Yes Transaction attributes are involved in session beans , in fact transaction attribute is there for all beans.Entity , session and MDB.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, since the client owns the bean you better release the resource when you are done, unlike a stateless bean
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!