karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j.@nanthrax.net
Subject Re: Pluggable databases in apache karaf
Date Sat, 26 Oct 2019 12:13:16 GMT
<div dir='auto'>Hi<div dir="auto"><br></div><div dir="auto">Thanks
for sharing, I will take a look.</div><div dir="auto"><br></div><div
dir="auto">The purpose is to have a service layer ? What's the difference with pax-jdbc
and karaf JDBC feature ?</div><div dir="auto"><br></div><div dir="auto">Regards</div><div
dir="auto">JB</div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 26
oct. 2019 13:21, Steinar Bang &lt;sb@dod.no&gt; a écrit :<br type="attribution"
/><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p
dir="ltr">This blog post describes the way I switch between different database&#13;<br>
systems (in my case: switch between derby and PostgreSQL) in apache&#13;<br>
What I do, is:&#13;<br>
 1. Create an application specific DatabaseService interface&#13;<br>
 2. Inject the application specific DatabaseService into the business&#13;<br>
&nbsp;&nbsp;&nbsp; logic DS component&#13;<br>
 3. Create an OSGi bundle defining a liquibase schema&#13;<br>
 4. Create a DS component providing the DatabaseService that starts&#13;<br>
&nbsp;&nbsp;&nbsp; derby in-memory database and install the liquibase schema&#13;<br>
 5. Create a DS component providing the DatabaseService that connects to&#13;<br>
&nbsp;&nbsp;&nbsp; PostgreSQL and install the liquibase schema&#13;<br>
 6. Create different karaf features that&#13;<br>
&nbsp;&nbsp;&nbsp; 1. load the application with the derby DS component&#13;<br>
&nbsp;&nbsp;&nbsp; 2. load the application with the PostgreSQL component&#13;<br>
More detail and examples in the blog post.&#13;<br>
View raw message