• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

About object relational mapping file requirements from a free Whizlab test  RSS feed

 
Ranch Hand
Posts: 1701
12
  • Mark post as helpful
  • send pies
  • 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>.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!