Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Statefule session Bean

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 40521
825
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Now I am super curious what sports would be like if we allowed drugs and tiny ads.
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic