I found the reason.

The jdbc feature installs the pax-jdbc feature which installs the pax-jdbc
bundle. This bundle creates one DataSourceFactory for all jdbc drivers it
finds. This is the source of the duplicate DataSourceFactories.

We should not install pax-jdbc feature in the karaf jdbc feature as this
makes it harder to use proper drivers that already provide good
DataSourceFactories. If we do this then of course this means we will have
to re add the adapter bundle to pax-jdbc-derby.

On the other hand whenever some installs the feature by hand we will also
get into the situation of duplicate DSFs.

WDYT?

Christian

Am Di., 5. Feb. 2019 um 15:36 Uhr schrieb Grzegorz Grzybek <
gr.grzy...@gmail.com>:

> Indeed ;)
>
> karaf@root()> bundle:services -p 45
> karaf@root()> feature:install jdbc
> karaf@root()> bundle:services -p 45
>
> Apache Derby 10.14 (45) provides:
> ---------------------------------
> objectClass = [org.osgi.service.jdbc.DataSourceFactory]
> osgi.jdbc.driver.class = org.apache.derby.jdbc.AutoloadedDriver
> osgi.jdbc.driver.name = derby
> osgi.jdbc.driver.version = 10.14.2000000.1828579
> service.bundleid = 45
> service.id = 88
> service.scope = singleton
>
> regards
> Grzegorz Grzybek
>
> wt., 5 lut 2019 o 15:34 Jean-Baptiste Onofré <j...@nanthrax.net> napisał(a):
>
> > Hi Christian,
> >
> > you have to install the jdbc feature, it will work.
> >
> > That has been found yesterday evening, already created the Jira at Pax
> > JDBC. I have to check why Karaf jdbc feature makes the derby
> > DataSourceFactory available.
> >
> > Regards
> > JB
> >
> > On 05/02/2019 15:28, Christian Schneider wrote:
> > > I just tried the derby data source:
> > >
> > > feature:install pax-jdbc-derby pax-jdbc-config pax-jdbc-pool-dbcp2
> > > service:list DataSourceFactory
> > >
> > > I see no services of this type. So it seems the derby bundle does not
> > offer
> > > a DataSourceFactory.
> > >
> > > Christian
> > >
> > > Am Di., 5. Feb. 2019 um 10:57 Uhr schrieb Jean-Baptiste Onofré <
> > > j...@nanthrax.net>:
> > >
> > >> Hi all,
> > >>
> > >> I submit Apache Karaf (runtime) 4.2.3 to your vote. This is a
> > >> maintenance release on the 4.2.x series, bringing some improvements
> and
> > >> bug fixes.
> > >> NB: Once this release vote passed, I will create the karaf-4.2.x
> branch
> > >> and master will become 4.3.x. Obviously karaf-4.2.x will be an active
> > >> branch and I already plan to prepare 4.2.4 release.
> > >>
> > >> Release Notes:
> > >>
> > >>
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12344587
> > >>
> > >> Staging Repository:
> > >>
> https://repository.apache.org/content/repositories/orgapachekaraf-1125/
> > >>
> > >> Git Tag:
> > >> karaf-4.2.3
> > >>
> > >> Please vote to approve this release:
> > >>
> > >> [ ] +1 Approve the release
> > >> [ ] -1 Don't approve the release (please provide specific comments)
> > >>
> > >> This vote will be open for at least 72 hours.
> > >>
> > >> Thanks,
> > >> Regards
> > >> JB
> > >> --
> > >> Jean-Baptiste Onofré
> > >> jbono...@apache.org
> > >> http://blog.nanthrax.net
> > >> Talend - http://www.talend.com
> > >>
> > >
> > >
> >
> > --
> > Jean-Baptiste Onofré
> > jbono...@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
> >
>


-- 
-- 
Christian Schneider
http://www.liquid-reality.de

Computer Scientist
http://www.adobe.com

Reply via email to