In Enthuware, there is a question:
"
A persistence archive file named ejbplusPU.jar contains the following files:
com/enthu/ejbplus/Account.class
com/enthu/ejbplus/Person.class
META-INF/persistence.xml
META-INF/orm.xml
Given that Account and Person classes contain all the mapping information in the form of annotations, which of the above files will always be examined by the container when this jar is deployed? "
My answer is "persistence.xml" and "orm.xml", but no class files.
But the correct answer includes those class files.
According to persistence spec, "Any annotated managed
persistence classes found in the root of the persistence
unit are added to the list of managed persistence classes."
Here, Account.class and Person.class aren't at the root of the persistence unit, so why should they be examined?