owner
owner copied to clipboard
best way to create JDBC datasource?
Is there any preliminary JDBC support? If not, that's ok. I'm more than happy to contribute if someone points me in the right direction. :) Maybe there's a fork out there somewhere?
Hi. No, there isn't any support for jdbc and I'm not aware of any fork implementing that. It should be easy to implement a jdbc properties loader (see Loader interface).
Awesome, thanks @lviggiano . Are you guys open to accepting a PR implementing a JDBC-based Loader implementation?
Sure, you can open a pull request. Just be patient, since it's some time I'm not actively working on this project for health reasons, so it may take time for me to review. I plan to get back to work on this soon (asap).
If you need to load properties form the database and don't want to wait for native database loader support, just use Importing Properties feature. So all you need to do is write the code which will load properties from the database into Properties object and then create your Owner config from that Properties object.
Properties props = loadFromDatabase();//<- you need to implement this method
ImportConfig cfg = ConfigFactory
.create(ImportConfig.class, props); // props imported!