Skip to main content

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

Hi Michael,

Is there a way to disable this validation for production machines? ... or is
it so cheap there is no point? :)

Thanks,
Gili


mobrien wrote:
> 
> 
> Gili
> 	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
> 	/michael
>  
> -----Original Message-----
> From: cowwoc [mailto:cowwoc@xxxxxxxxxxxxxxxx]
> Sent: Thursday, September 04, 2008 14:01
> To: eclipselink-users@xxxxxxxxxxx
> Subject: [eclipselink-users] Validating schema
> 
> 
> 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
> _______________________________________________
> 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-tp19316501p19334464.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top