persistence@glassfish.java.net

Validation of XML DD for persistence api

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Fri, 10 Mar 2006 16:50:32 +0530

Hi Mike,

I don't recollect to have seen any requirement about validation of
deployment descriptors in Java Persistence API spec. So, in Java SE, is
a provider not *required* to validate persistence.xml and orm.xml? We
should add this restriction in the spec.

In Java EE we have a slightly different problem. As per the Java EE
platform rules, XML deployment descriptors must be validated against
corresponding dtd/schema during deployment. Question is who is
responsible for this validation? My assumption is that container *must*
validate persistence.xml and persistence provider *must* validate
mapping xml(orm.xml). Is this a correct assumption?

During a discussion with Marina, this issue came up. We felt it is
necessary to get a clarification on this regard.
TopLink Essential does not validate any of them. See bugs:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=384 and
https://glassfish.dev.java.net/issues/show_bug.cgi?id=385

Thanks,
Sahoo