OPENJPA-1203 Doc createEMF() exception behaviors

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@822006 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Donald Woods 2009-10-05 21:01:51 +00:00
parent b058e70382
commit 18cd43dfcd
1 changed files with 33 additions and 0 deletions

View File

@ -248,6 +248,39 @@
example test case demonstrating the change.
</para>
</section>
<section id="createemf">
<title>
createEntityManagerFactory Exceptions
</title>
<para>
The JPA 2.0 specification section on
"Bootstrapping in Java SE Environments" states
that persistence providers must return null
if they are not a qualified provider for the
given persistence unit.
</para>
<para>
However, OpenJPA may throw a RuntimeException
if an error occurs while trying to create a
qualified persistence unit, like for invalid
openjpa.* specific configuration settings or
for schema validation failures.
</para>
<para>
If the Apache Geronimo JPA 2.0 Spec APIs are
used, then any exceptions returned by a
persistence provider will be wrapped within
a PersistenceException. When the JPA 2.0 API
reference implementation is used, any
RuntimeExceptions will be returned to the
calling application without being wrapped.
Other JPA 2.0 API and implementation providers
or versions may behave differently.
</para>
<para>
See OPENJPA-1203 for more details.
</para>
</section>
</section>
</section>
</appendix>