This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes A question form Sun's Free Proficiency Assessment System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "A question form Sun Watch "A question form Sun New topic
Author

A question form Sun's Free Proficiency Assessment System

Fu Dong Jia
Ranch Hand

Joined: May 23, 2007
Posts: 131

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?


who dare win!<br />SCJP5(94%)|SCWCD5(86%)|SCBCD(100%)|SCEA in progress
Chaminda Amarasinghe
Ranch Hand

Joined: May 17, 2006
Posts: 402
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: A question form Sun's Free Proficiency Assessment System