commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Hoffstätte (JIRA) <>
Subject [jira] [Commented] (DBCP-363) dbcp bundle should use DynamicImport
Date Sat, 11 Jun 2011 08:53:58 GMT


Holger Hoffstätte commented on DBCP-363:

The whole purpose of OSGi is to *prevent* the kind of unfettered access and more or less random
class wiring established by DynamicImport; it's a bad practice that should die out. Instead
of letting dbcp blindly create instances the right thing to do would be use proper OSGi lookup
of a DataSource through an OSGi-aware factory.

> dbcp bundle should use DynamicImport
> ------------------------------------
>                 Key: DBCP-363
>                 URL:
>             Project: Commons Dbcp
>          Issue Type: Bug
>    Affects Versions: 1.3, 1.4
>            Reporter: Felix Mayerhuber
> The bundle provided in the maven central of the commons.dbcp doesn't have a DynamicImport
defined. This resolves in following error:
> If you want to use a BasicDataSource class as dataSource and the class is provided by
the osgi environment (equinox, ...) the dataSource is not able to be created due to a ClassNotFoundException.
If the bundle would have set DynamicImport it works. (I had to change from your bundle to
the commons.dbcp bundle provided by servicemix, because there the DynamicImport is set)

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message