File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

associated with a transaction?

 
Simon Ingram
Ranch Hand
Posts: 173
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Vitaliy Geraymovych
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Sujatha Kumar
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic