>>>>> [email protected]: > Hi > Thanks for sharing, I will take a look.
> The purpose is to have a service layer ? The purpose is to have a database that is ready to be used (ie. connected and with a schema) by the business logic code, and to make it easy to switch databases. > What's the difference with pax-jdbc and karaf JDBC feature ? It builds on top of them. pax-jdbc provides a DataSourceFactory. The components described in the blog post provides a DataSource. The addition to pax-jdbc is actually connecting to the database and using liquibase to set up/modify the schema and insert initial data. Ie. my application specific database DS components use pax-jdbc (in the case of derby) and the PostgreSQL driver to get the DataSourceFactory When the application specific database DS components receive a DataSourceFactory injection and they are activated, the first thing they do is get a DataSource from the DataSourceFactory. This DataSource is kept around while the DS component is active. Before exposing any service, the application specific database DS component will run liquibase scripts to set up/update the schema (and add initial data), and when the scripts have run expose the application specific database service.
