• 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 bean passivation

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
EJB 3.0 Core Specification:A container may only passivate a stateful session bean instance when the instance is not in a transaction.
I was thinking how and when such a scenario come up. After thinking for a while the following struck me.

a) Client starts a transaction using UserTransaction JNDI lookup.
b) Client invokes business methods on the session bean via session beans business interface.

Client remains idle long enough so that container can decide to passivate the sesion bean instance servicing the client.But before transfering the converstaional state to secondary storage, container realizes that this instance is in the middle of a transaction and hence will not passivate the instance.
****************************************
---------------
Environment
---------------
EJB Version : 3.0
Application Server: JBOSS 4.2.3.GA
J2SE: 1.5 or 5.0
OS: Windows XP
****************************************

a) Is my understanding correct? Are there any other scenarios ?
b) The container came to knew that the instance is middle of the transaction because the client requested the transaction from the transaction service provided by the container. Is this correct?
c) Why does not the container passivate the instance if its in the middle of a transaction. What is the problem?
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Experts, Please take time and reply.
 
Could you hold this kitten for a sec? I need to adjust this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic