• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

About object relational mapping file requirements from a free Whizlab test

 
Bartender
Posts: 2418
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I found a free Whizlab mock exam , there is a question and answer:


Which of the following statement is correct about an object/relational mapping file?
Choose one.
A. It must be named orm.xml
B. It must be in the META-INF directory in the root of the persistence unit.
C. It must be on the classpath
D. It must be in location specified in either option B or C.
E. None of the above.

Given answer is A.

As 8.2.1.6.2, an object/relational mapping XML file named orm.xml may be
specified in the META-INF directory, in the root of the persistence unit
or in the META-INF directory of any jar file referenced by the persistence.xml.
Alternatively, or in addition, one or more mapping files may be referenced
by the mapping-file elements of the persistence-unit element.
These mapping files may be present anywhere on the class path.



I think the correct answer should be E because of the following reasons:
for A, object/relational mapping file may be called some other names, not necessarily called orm.xml.
for B, if it is called orm.xml, then it must be in META-INF in the root of the persistence unit.
for C, if it is called something else, it must be in the classpath specified by <mapping-file> in
persistence.xml. Or, if it is called something else, it may be in the META-INF directory of the root persistence unit being specified by <mapping-file>.

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic