Page 1 of 1

About Question enthuware.oce-jpad.v6.2.419 :

Posted: Wed Mar 25, 2015 6:19 am
by stiekemaj
In this question, it is not clear whether the entity manager is a transaction-scoped or extended-scoped. When the entity manager is transaction-scoped, the correct answer will be 'X', because on line 6, the entity is unmanaged.

I've seen this kind of question earlier where the scope of the entity manager is not clear. When we see this kind of questions on the real exam, can we expect that the entity manager is always extended-scoped?

Re: About Question enthuware.oce-jpad.v6.2.419 :

Posted: Wed Mar 25, 2015 7:07 am
by admin
The last line of the problem statement does say, "(Assume that extended scoped EntityManager is used.)". Please let me know if you are not seeing this line in your viewer.

In the exam, if the answer depends on the type of the entity manager, the question will specify that. If it is not specified, then you should assume that it could be either one and you should select the option that is correct for both the cases.

HTH,
Paul.

Re: About Question enthuware.oce-jpad.v6.2.419 :

Posted: Mon Sep 07, 2015 3:51 pm
by romsky
I see the question in that form:

Consider the following entity code: @Entity public class LifecycleCallbackTestEntity implements Serializable { // attributes and accessor methods not shown @PrePersist public void m1(){ System.out.println("X"); } @PreUpdate public void m2(){ System.out.println("Y"); } } What will be printed when an application performs the following steps - 1. Creates the entity 2. Begins a transaction 3. Persists the entity 4. Commits the transaction 5. Begins another transaction 6. Updates the entity 7. Commits the transaction. (Assume that extended scoped EntityManager is used.)

The Java code has to be formatted.

Re: About Question enthuware.oce-jpad.v6.2.419 :

Posted: Tue Sep 08, 2015 10:09 am
by admin
Attached is what I see. Could you please mention your platform details so that I can investigate?

-Paul.
test.png
test.png (21.92 KiB) Viewed 4486 times

Re: About Question enthuware.oce-jpad.v6.2.419 :

Posted: Tue Sep 08, 2015 4:43 pm
by romsky
I use moc-exam on MacOS.

vromanov@romsky-apple:~/Exam $ java -jar etsviewer.jar
JVM Vendor : Oracle Corporation
JVM VM Vendor : Oracle Corporation
JVM Version: 1.8.0_05
Java User Dir: /Users/vromanov/Exam
OS: Mac OS X
user.name: vromanov
user.home: /Users/vromanov
-DfontSizeIncrement=null
-DuseAWTFileDialog=null
-Dswing.defaultlaf=null
L&F In Use : [Aqua Look and Feel for Mac OS X - com.apple.laf.AquaLookAndFeel]
ETS_INIT: INITED
User Data Dir: /Users/vromanov/cefdex/JAVA/ETSWF_com_enthuware_ets_oca-jp-i_v7
User Data Dir: /Users/vromanov/Exam/ETSWF_com_enthuware_ets_oce-jpad_v6
Created QDWin