• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #109 (new story)

Opened 2 years ago

Last modified 2 years ago

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

Changed 2 years ago by jmoore

  • cc sfrank added
Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/