Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCBCD mock exam question

 
subba rao
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic