• 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

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
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic