• 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

Confirmation About Transaction

 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Session bean instance will throw exception if removed within a Transaction.

Session bean instance cannot passivated within a Transaction.

The entity bean instance can be passivated within a Transaction
 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by gowher amin naik:
Session bean instance will throw exception if removed within a Transaction.

Session bean instance cannot passivated within a Transaction.

The entity bean instance can be passivated within a Transaction



Yes ,session bean innstance will throw exception when removed within transaction aslo it cannot be passivated while in transaction.

But entity bean instance cannot be passivated while in transaction.
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mikalai Zaikin's notes chapter no-: 7

The container CAN choose to passivate an entity bean instance WITHIN a transaction.
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

According to specs section 12.1.3
The container can choose to passivate an entity bean instance within a transaction. To passivate
an instance, the container first invokes the ejbStore method to allow the instance to synchronize
the database state with the instance�s state, and then the container invokes the ejb-
Passivate method to return the instance to the pooled state.



So entity bean can be passivated in transaction.
 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And in ejb-3_0-fr-spec-ejbcore 8.5.1:

The container can choose to passivate an entity bean instance within a transaction. To passivate
an instance, the container first invokes the ejbStore method to allow the instance to prepare
itself for the synchronization of the database state with the instance�s state, and then the container
invokes the ejbPassivate method to return the instance to the pooled state.
 
reply
    Bookmark Topic Watch Topic
  • New Topic