| Author |
SCBCD mock exam question
|
subba rao
Greenhorn
Joined: Apr 24, 2008
Posts: 24
|
|
3)Given the following code:
Public void create () {
try {
doA () {
} catch (PersistenceException e) {}
try (doB) ();
} catch (PersistenceException e) {}
}
Calling method doA will cause an NonUniqueResultException to be thrown. Calling method doB will
cause an EntityExistsException to be thrown. What two options describe what will happen when the
create method is called within an application ' uses container managed transactions? (Choose two)
A. Method doB will never be called.
B. The current transaction will continue after doA executes.
C. The current transaction will continue after doB executes.
D. The current transaction will be marked for rollback when doA is called.
E. The current transaction will be marked for rollback when doB is called.
A developer has created a deep entity class hierarchy with many polymorphic relationships between
entitles. Which inheritance strategy, as defined by the inheritance Type enumerated type, will be
most performed in this scenario?
A. Single table-per-class-hierarchy (InheritanceType.SINGLE_TABLE)
B. Joined-subclass (inheritanceType. JOINED)
C. Table-per-concrete-class (inheritanceType.TABLE_PER_CLASS)
D. Polymorphic join table (inheritanceType. POLYMORPHIC_JOIN_TABLE)
what is the answer for this question and why?
|
 |
Anilkumar Ramachendruni
Greenhorn
Joined: Aug 25, 2012
Posts: 1
|
|
Hi,
The correct answer is Single table-per-class-hierarchy (InheritanceType.SINGLE_TABLE) .
You can refer the link http://docs.oracle.com/javaee/6/tutorial/doc/bnbqn.html
|
 |
 |
|
|
subject: SCBCD mock exam question
|
|
|