I have had great success, and we encourage this via doing it in ojb-blank, using ant's property substitution and a properties file for the database configs.

Store an ant property style variable in the repository files that gets replaced via the ant property at build time. You can look at the OJB build (the various profiles are the db specific properties) or the ojb-blank build.xml and build.properties (joined them together for the get-started-quickly blank project) for examples.

-Brian

On Apr 24, 2004, at 5:37 PM, David Sean Taylor wrote:

I am trying to change the database to Oracle or MySQL.
So I add this to my HOME build.properties:

database.default.name = mysql
org.apache.jetspeed.database.url = jdbc:mysql://arsenal/j2-test
org.apache.jetspeed.database.driver = com.mysql.jdbc.Driver
org.apache.jetspeed.database.user = jetspeed
org.apache.jetspeed.database.password = whatever

But I noticed that OJB was creating JOIN statements for HSQL, not Oracle.
After some digging i see we have a repository_database.xml, and it seems to be replicated all over the place, in:


components/persistence
components/prefs
components/registry
components/security
portals

<jdbc-connection-descriptor
        jcd-alias='jetspeed'
        default-connection='true'
        platform="Hsqldb'

I think it would be best if we only had to change the database connection and OJB directive in one centralized place.
Or perhaps one place for tests, and one for deployment.


Does anyone know how to parameterize the "default-connection" attribute above?
Or does anyone know a better way to set OJB's platform?



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to