This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming 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
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

can be passivated when the bean instance is associated with a transaction?

 
Ranch Hand
Posts: 94
  • 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.
Is it true?

Thanks,
Vijay
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the answer is false. Beans only get passivate before the instance becomes disassociated with a specific EJB object. Therefore ejbPassivate() executes in an unspecified transaction context.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According to Spec :-
The container can choose to passivate an entity bean within a transaction.
Before passivating it calls
1. ejbStore() ( which will be called within a transactional context)
2. ejbPassivate() ( this action does not really need a transactional context)

Where as a Stateful session bean will never be passivated within a transaction.

Vijay.
 
vijay Mamilla
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Vijay ...Thanks Vijay
 
David McDonagh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya Vijay is correct ..... from the spec P208 "10.9.3 Passivating and activating" the interaction diagram clearly shows that cmp can be passivated after ejbStore() is called.
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!