• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

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

Thanks,
Vijay
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Vijay ...Thanks Vijay
 
David McDonagh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic