Skip to main content

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

	Hi, good question.  For most of the elements and properties it should.
	There is one case that it will not qualify (your schema on the db).
	In the case that you are using a JTA datasource (RESOURCE_LOCAL probably as well) - then that datasource will not be used until you do something that requires a transaction with some of your entities or you do a query on them.  The datasource is set on the PersistenceUnitInfoImpl in predeploy() but we only use it and get a connection in JNDIConnector.connect() during a crud operation.

	thank you
-----Original Message-----
From: cowwoc [mailto:cowwoc@xxxxxxxxxxxxxxxx]
Sent: Thursday, September 04, 2008 14:01
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Validating schema


    I'd like to add a JUnit test which will validate persistence.xml and 
any associated database schema, annotations, etc. Is the following code 

        EntityManagerFactory emf = 
        EntityManager em = emf.createEntityManager();

    Or do I need to do anything special? Also, is there a way to disable 
this validate for production machines?

Thank you,
eclipselink-users mailing list

Back to the top