Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-900 Topic 2 Question 64 Discussion

Actual exam question for Oracle's 1Z0-900 exam
Question #: 64
Topic #: 2
[All 1Z0-900 Questions]

Given the code fragments:

What code should you add to the body of the updateEmployee method in order to save pending changes to the database?

Show Suggested Answer Hide Answer
Suggested Answer: A, B

Contribute your Thoughts:

Dalene
1 months ago
I'll have to go with C on this one. Merging the employee object inside a transaction is the way to go. Anything else is just overkill, in my opinion.
upvoted 0 times
...
Ceola
1 months ago
Hmm, C seems like the winner here. The other options look a bit convoluted. Why complicate things when you can just use the good ol' transaction approach?
upvoted 0 times
...
Dominga
1 months ago
Aha, C is the way to go! Wrapping the merge in a transaction is the way to ensure the changes get saved properly. Simple and effective.
upvoted 0 times
Serina
7 days ago
User 1: Aha, C is the way to go!
upvoted 0 times
...
...
Maurine
1 months ago
I'm not too sure about the other options, but C looks like it covers all the bases. Gotta love that clear transaction management.
upvoted 0 times
Jennie
2 days ago
I would go with option A, it seems like the simplest solution.
upvoted 0 times
...
Marlon
16 days ago
I think option B is also a good choice because it includes transaction management.
upvoted 0 times
...
Lynelle
1 months ago
I agree, option C seems like the safest choice.
upvoted 0 times
...
...
Jacinta
2 months ago
Option C looks like the right choice. It starts a transaction, merges the employee object, and then commits the transaction. Seems straightforward.
upvoted 0 times
Bettye
20 days ago
Yes, option C is the best choice for saving pending changes to the database. It follows the correct transaction handling steps.
upvoted 0 times
...
Colene
1 months ago
I agree, option C seems to be the correct way to save pending changes to the database.
upvoted 0 times
...
Lasandra
1 months ago
Option C looks like the right choice. It starts a transaction, merges the employee object, and then commits the transaction. Seems straightforward.
upvoted 0 times
...
...
Irene
2 months ago
I'm not sure, but I think B) Context. Ctx = new InitialContext();UserTransaction utx = (UserTransaction)ctx.lookup(''java:comp/UserTransaction'');utx.begin();entityManager.merge(emp);utx.commit();. entityManager.lock(emp);EntityManager.merge(emp); might be the correct answer.
upvoted 0 times
...
Beata
2 months ago
I believe the answer is C) entityManager.getTransaction().begin();entityManager.merge(emp);entityManager.getTransaction().commit();
upvoted 0 times
...
Coleen
2 months ago
I think the answer is A) entityManager.merge(emp);
upvoted 0 times
...
Ronnie
2 months ago
I'm not sure, but option B) seems like it could be the right choice with the UserTransaction involved.
upvoted 0 times
...
Shayne
3 months ago
I believe the answer is C) entityManager.getTransaction().begin();entityManager.merge(emp);entityManager.getTransaction().commit();
upvoted 0 times
...
Rosendo
3 months ago
I think the correct answer is A) entityManager.merge(emp);
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77