User Story #109 (closed)
Opened 18 years ago
Closed 14 years ago
Profiles for multiple DBs, Appservers, etc.
Reported by: | jamoore | Owned by: | jamoore |
---|---|---|---|
Priority: | minor | Milestone: | Unscheduled |
Component: | Deployment | Keywords: | n.a. |
Cc: | sfrank | Story Points: | n.a. |
Sprint: | n.a. | Importance: | n.a. |
Total Remaining Time: | n.a. | Estimated Remaining Time: | n.a. |
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 (2)
comment:1 Changed 18 years ago by jmoore
- Cc sfrank added
comment:2 Changed 14 years ago by jmoore
- Resolution set to invalid
- Status changed from new to closed