Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization 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
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

associated with a transaction?

 
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,

True or false?

An entity bean instance with container-managed persistence can be passivated when the bean instance is associated with a transaction



The answer is true. I said false because the container usually throws an exception when the user tries to invoke a bean method while the bean is processing another method. See HFEJB page 558 Transaction Scenario 2 and page 559 Client Scenario 3.

Surely if the bean is associated with a transaction it is in an open transaction?

regards
Simon
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Simon Ingram:
Hi ranchers,

True or false?



The answer is true. I said false because the container usually throws an exception when the user tries to invoke a bean method while the bean is processing another method. See HFEJB page 558 Transaction Scenario 2 and page 559 Client Scenario 3.

Surely if the bean is associated with a transaction it is in an open transaction?

regards
Simon



I was going between true and false for a while.

But here is what I found in the spec. page 253.
"The container invokes this method with an unspecified transaction context.
Note that if the instance state has been updated by a transaction, the container must first invoke the ejbStore() method on the instance before it invokes ejbPassivate() on it."

Vitaliy
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


An entity bean instance with container-managed persistence can be passivated when the bean instance is associated with a transaction



When a Bean instance is associated with a trasaction, it
cannot be Passivated
 
Vitaliy Geraymovych
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sujatha Kumar:


When a Bean instance is associated with a trasaction, it
cannot be Passivated



My understanding is that entity bean can be passivated as per spec.
Session bean cannot be passivated.

Vitaliy
reply
    Bookmark Topic Watch Topic
  • New Topic