Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Validating schema

What I find even more confusing is that according to
PersistenceUnitProperties.VALIDATION_ONLY_PROPERTY is enabled by default.

1) If that's true, when does EclipseLink actually open a connection?
2) Is it possible to open a connection without prior validation (for
performance reasons on production machines)?


cowwoc wrote:
> Hi,
>     I'd like to add a JUnit test which will validate persistence.xml and 
> any associated database schema, annotations, etc. Is the following code 
> enough?
>         EntityManagerFactory emf = 
> Persistence.createEntityManagerFactory("MyPersistenceUnit");
>         EntityManager em = emf.createEntityManager();
>         em.close();
>     Or do I need to do anything special? Also, is there a way to disable 
> this validate for production machines?
> Thank you,
> Gili
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx

View this message in context:
Sent from the EclipseLink - Users mailing list archive at

Back to the top