Ticket #109 (new story)
Profiles for multiple DBs, Appservers, etc.
| Reported by: | jmoore | Owned by: | jmoore |
|---|---|---|---|
| Priority: | minor | Milestone: | Unscheduled |
| Component: | Deployment | Version: | 3.0-M1 |
| Keywords: | Cc: | sfrank |
Description
By adding profiles in the *.properties files we should be able to customize the build (esp. for testing) by simply defining a single property:
java omero -Ddb.profile=mysql fullbuild java omero -Das.profile=jonas fullbuild
For db.profile, hibernate.profiles needs to have several sections of the form:
psql.dialect=org.hibernate.dialect.PostgreSQLDialect psql.connection.driver_class=org.postgresql.Driver psql.connection.url=jdbc\:postgresql\://localhost/omero ... mysql.dialect=... mysql.connection.driver=... mysql.connection.url=... ...
Then in the spring configuration (ome/services/hibernate.xml) use "${db.profile}.dialect" etc.for configuring Hibernate.
A similar method could be used in jndi.properties for different application servers:
jboss.java.naming.factory.initial=org.jboss.security.jndi.JndiLoginInitialContextFactory jboss.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces ... jonas.java.naming.factory.initial=... jonas.java.naming.factory.url.pkgs=... ...
and possibly also for different authentication methods (aa.profile).
Originally http://bugs.openmicroscopy.org.uk/show_bug.cgi?id=651
Change History
Note: See
TracTickets for help on using
tickets.
