• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Confirmation About Transaction

 
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
 
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.
 
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.
 
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.
 
Bring me the box labeled "thinking cap" ... and then read this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!