You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by boodoopl <ma...@gmail.com> on 2014/11/02 20:05:35 UTC

Re: Creating Karaf custom distribution with JDBC data source

Hi,

I've tested both:
* With derby-datasoruce bundle: it works fine, but it is against code
reusability rule:P The datasource cannot be uninstalled by jdbc:delete
command, because the bundle is not inside deploy directory, so there is some
exception about that
* With jdb-default-selector bundle: I was not able to make it working on
initial custom Karaf distribution startup - I mean datasource was not ready
and I got some exceptions from JPA - but when I started Karaf second time
everything worked fine; the same situation during integration tests - they
also failed due to missing datasource

So I also vote for 1.

But I found third possibility introduced by Karaf 3.0.2  KARAF-3034
<https://issues.apache.org/jira/browse/KARAF-3034>  

If I understand the feature correctly: If a special .etc file is put inside
the custom distribution the datasource will be created automatically.
What is unclear for me:
* What should be the etc file name
* What should be the etc file content
* How to add etc file to custom distrubution by karaf-maven-plugin



--
View this message in context: http://karaf.922171.n3.nabble.com/Creating-Karaf-custom-distribution-with-JDBC-data-source-tp4036058p4036195.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Creating Karaf custom distribution with JDBC data source

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,

I don't understand your first point: even if the bundle is installed, it 
doesn't mean the datasource is there. If you remove the blueprint 
datasource descriptor from the deploy folder, the datasource is removed. 
The bundle stays there, but it's not a problem.
More over, as jdbc:create can install the "driver" bundle, I can add an 
option to uninstall the "driver" bundle.

Regards
JB

On 11/02/2014 08:05 PM, boodoopl wrote:
> Hi,
>
> I've tested both:
> * With derby-datasoruce bundle: it works fine, but it is against code
> reusability rule:P The datasource cannot be uninstalled by jdbc:delete
> command, because the bundle is not inside deploy directory, so there is some
> exception about that
> * With jdb-default-selector bundle: I was not able to make it working on
> initial custom Karaf distribution startup - I mean datasource was not ready
> and I got some exceptions from JPA - but when I started Karaf second time
> everything worked fine; the same situation during integration tests - they
> also failed due to missing datasource
>
> So I also vote for 1.
>
> But I found third possibility introduced by Karaf 3.0.2  KARAF-3034
> <https://issues.apache.org/jira/browse/KARAF-3034>
>
> If I understand the feature correctly: If a special .etc file is put inside
> the custom distribution the datasource will be created automatically.
> What is unclear for me:
> * What should be the etc file name
> * What should be the etc file content
> * How to add etc file to custom distrubution by karaf-maven-plugin
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Creating-Karaf-custom-distribution-with-JDBC-data-source-tp4036058p4036195.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com