owner icon indicating copy to clipboard operation
owner copied to clipboard

best way to create JDBC datasource?

Open The-Alchemist opened this issue 9 years ago • 4 comments

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?

The-Alchemist avatar Jan 25 '16 23:01 The-Alchemist

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).

lviggiano avatar Jan 26 '16 15:01 lviggiano

Awesome, thanks @lviggiano . Are you guys open to accepting a PR implementing a JDBC-based Loader implementation?

The-Alchemist avatar Jan 26 '16 15:01 The-Alchemist

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).

lviggiano avatar Jan 26 '16 15:01 lviggiano

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!

vgarmash avatar Aug 26 '16 16:08 vgarmash