I do this configuration using maven. It is possible to create maven profiles with the parameters you want. For example:
<profiles>
<profile>
<id>db-local</id>
<properties>
<spring.profile.name>dbcp</spring.profile.name>
<hibernate.dialect>org.hibernate.dialect.HSQLDialect</hibernate.dialect>
<hibernate.driver>org.hsqldb.jdbcDriver</hibernate.driver>
...
</properties>
</profile>
<profile>
<id>db-central</id>
<properties>
<spring.profile.name>dbcp</spring.profile.name>
<hibernate.dialect>org.hibernate.dialect.Oracle10gDialect</hibernate.dialect>
<hibernate.driver>oracle.jdbc.driver.OracleDriver</hibernate.driver>
...
</properties>
</profile>
...
Then you can define this variables in your java code or in your xml descriptor as this : ${hibernate.dialect}.
If you do so, then maven has to filter this files before compiling/packaging in order to replace maven variables. This can be done using maven resources plugin or maven war plugin.
Here you are an example of maven filtering:
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<filtering>true</filtering>
<directory>src/main/webapp</directory>
<includes>
<include>WEB-INF/web.xml</include>
<include>WEB-INF/springConfig/app-bbdd-dbcp.xml</include>
<include>WEB-INF/springConfig/app-security.xml</include>
</includes>
</resource>
</webResources>
<configuration>
</plugin>
</plugins>
You can activate or deactivate spring plugins by means of maven variables.
Here you can see a fully working project as I've described you: https://github.com/malaguna/casiopea
select * from (select x,y from foo) where x > 0will work in e.g. H2 or HSQLDB, but not in Postgres. Postgres has afull outer join, H2 does not.where (a,b) in (select c,d from bar)works in Postgres and HSQLDB, but not in H2.select a,b from foo f join bar b on f.a = b.bwill work in HSQLDB, but fails in Postgres and H2 (if bothfooandbarhave columns namedaandb).