persistence@glassfish.java.net

issue #1051: throw exception if mapping file is not found

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Fri, 22 Sep 2006 23:20:41 +0530

Hi Tom,

I am working on
https://glassfish.dev.java.net/issues/show_bug.cgi?id=1051. The current
behavior is to log a message when mapping file does not exist. I am
planning to change it to throw an exception by default, but I see some
entity-persistence-tests failing as they specifically test for the
current behavior. The persistence.xml has such text:
<!-- this is here for testing purposes - ensures a persistence unit can
load even with a file that does not exist. Please do not add an xml
file called: META-INF/non-existant-orm-file.xml -->
                
<mapping-file>META-INF/non-existant-orm-file.xml</mapping-file>

Is there a specific reason behind the current behavior? Can we change it?

Also, what's this property called toplink.orm.throw.exceptions? I don't
find any documentation for this property. It is used in current code.

Thanks,
Sahoo