Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

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.
 
I'm doing laundry! Look how clean this tiny ad is:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic