edulify / play-hikaricp.edulify.com

HikariCP Plugin for Playframework 2.2.x and 2.3.x
http://edulify.github.io/play-hikaricp.edulify.com/
Apache License 2.0
82 stars 35 forks source link

Support for custom JDBC Connection properties #73

Open anandp504 opened 9 years ago

anandp504 commented 9 years ago

We use play-hikaricp plugin to pool database connection with Vertica. Vertica supports automatic switchover to one of the nodes in the cluster if the primary node goes down through the jdbc property BackupServerNode. However, play-hikaricp plugin doesn't seem to honour the custom connection property and hence we are not able to fallback to a different node in the cluster if the node mentioned in db.default.url property goes down. Is there a way to make this property work with HikariCP? We have verified that if we actually create a java.util.Properties and use that to create a JDBC Connection using HikariCP, it works.

db.default.url="jdbc://postgresql://IP-Address:Port/DBName" db.default.BackupServerNode="node2-domain,node3-domain"

marcospereira commented 8 years ago

Hello @anandp504,

Problem here is that we are mapping properties individually and in a very specific way, as you can see in the code bellow:

https://github.com/edulify/play-hikaricp.edulify.com/blob/master/app/com/edulify/play/hikaricp/HikariCPConfig.scala

Could you please post the code you mentioned that works as expected?