• 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

A question form Sun's Free Proficiency Assessment System

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


20. Which method of the EntityManager API is used to control the life-cycle of an application-managed persistence context?
1, EntityManager.remove
2, EntityManager.refresh
3, EntityManager.joinTransaction
4, EntityManager.getReference


If the answer is 3?
 
Ranch Hand
Posts: 413
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JPA Spec
3.1.1 EntityManager Interface
P.47
The methods close, isOpen, joinTransaction, and getTransaction are used to manage application-managed entity managers and their lifecycle.

Also If you only need to find the answer not the explanation, You can easily use elimination technique.
You must know the functionality of remove, refresh, getReference methods. neither is used to control the life cycle of em, then we can eliminate all 3. So answer is joinTransaction.
[ December 10, 2008: Message edited by: Chaminda Amarasinghe ]
 
Danger, 10,000 volts, very electic .... 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