• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Stateful Session Beans and transactions

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was wondering that if say a container managed trasanction starts with StatelessSessionBean A -> which then calls StatefulSessionBean B create method. Later during the same transaction another method calls the create method on StatefulSessionBean B, will the same StatefulSessionBean with the same state be returned from the first call? Or will the second or any subsequent create calls within the same transaction to the StatefulSessionBean just create a brand new instance as if coming from a different client?

Thanks.
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Stateful session beans are tied to a single session - one principal cannot have two instances of a specific bean. If a client makes a call to a SFSB and the same client makes another call before the method has returned (i.e. if the client is multithreaded) you will get an exception since concurrent calls to SFSBs is prohibeted by the spec.
 
reply
    Bookmark Topic Watch Topic
  • New Topic