Different database servers per environment

11 views
Skip to first unread message

enewb...@gmail.com

unread,
Sep 7, 2016, 1:09:43 PM9/7/16
to jOOQ User Group
At our company, we have separate database clusters for our separate environments, Dev, QA, and Live.  They've rolled out a remote config client that allows our apps to pull in the datasources and properties applicable for that environment.  Ideally, jooq will generate sources for the database corresponding to the environment it is running on so we can catch it at compile time if we didn't update our schema properly for the release.  Is there any way to pass in db url, user, and password instead of hard coding in the xml config?  If not, would there be an good place for us to override functionality?

Lukas Eder

unread,
Sep 7, 2016, 1:23:34 PM9/7/16
to jooq...@googlegroups.com
Hello,

If you're generating sources with Maven, you can use Maven properties (which you can define in environment specific profiles or external properties files) for the JDBC conneciton parameters.

Another option is to use programmatic code generation configuration [1], which would give you full control over the configuration per environment.

There was a feature request to support system properties for these things [2]. At the time, I had rejected the feature request, because I feel these properties won't stop at JDBC connection parameters, and there are better, more robust solutions than these properties.

I hope this helps,
Lukas


2016-09-07 19:02 GMT+02:00 <enewb...@gmail.com>:
At our company, we have separate database clusters for our separate environments, Dev, QA, and Live.  They've rolled out a remote config client that allows our apps to pull in the datasources and properties applicable for that environment.  Ideally, jooq will generate sources for the database corresponding to the environment it is running on so we can catch it at compile time if we didn't update our schema properly for the release.  Is there any way to pass in db url, user, and password instead of hard coding in the xml config?  If not, would there be an good place for us to override functionality?

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages