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
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#How_to_Use_the_Persistence_Unit_Properties_for_Customization_and_Validation
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)?

Thanks,
Gili


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
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 

-- 
View this message in context: http://www.nabble.com/Validating-schema-tp19316501p19318244.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top