Tuesday, 15 June 2010

java - Dynamically disable hbm2ddl.auto? -



java - Dynamically disable hbm2ddl.auto? -

i have eclipse workspace many projects, 1 project "shareddata" contains jpa entities, services, persistence.xml (using spring-data) , such. in other projects have included "shareddata" dependency in maven pom.xml .

when start 1 of other projects, jpa/hibernate validates , updates database tables (hbm2ddl.auto = true). works nicely.

but test entire project in need start several projects include "shareddata" project. every single project validates , updates database tables. takes quite bit of time.

is possible enable "hbm2ddl.auto" 1 single project? or possible dynamically disable "hbm2ddl.auto" @ application startup?

if possible start jms server project , database validation. next start other projects (tomcat , several server apps) , won't database validation.

saves me lot of time :-)

i did such things via scheme properties. unfortunately not know how initialize hibernate context. did via spring supports scheme properties using ${propname} syntax. if can utilize notation utilize in configuration files , set appropriate property in origin of unit test.

java jpa spring-data-jpa

No comments:

Post a Comment