Closed kand617 closed 6 years ago
With current implementation, Postgres JDBC driver is bundled in generated war file. If user(s) want to use a different database, how can they do so?
Excluding JDBC driver from generated war coupled with an external application properties file would give consumers to use the database of their own choice without making any changes to the code? Should this option be explored?
That thought has crossed my mind but I was not sure how someone provide a JDBC driver to a pre-built war/jar..... Is it as simple as ensuring the driver is on the classpath?
So I guess I will remove the dependency. A user can simply provide the appropriate driver on the classpath.
When we create a docker file, the docker file can fetch the driver jar and add it in to the class path and specify the driver in application.properties.
@sudhirtumati can you confirm the approach?
Yes, the dependency must be removed from war file.
With docker image, we could make a database (may be mysql or postgres or something else) as a dependent service. Related jar file can be made available in classpath
There were some issues with postgres support for lob. Unfortunately it was not a simple has specifying the driver and datasource.
See here for details on the issues. http://forums.ohdsi.org/t/specify-transactional-on-jpa-repository-for-operations-involving-lob-fields/370/9
http://javasampleapproach.com/spring-framework/spring-data/spring-hibernate-jpa-upload-download-file-image-to-postgresql-with-lob
https://stackoverflow.com/questions/3164072/large-objects-may-not-be-used-in-auto-commit-mode