Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confirmation About Transaction

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • 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
 
Awishek sinha
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Amol Nayak
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • 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.
 
Benoît de Chateauvieux
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic