You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2014/05/19 10:56:50 UTC
JDBC DataSource Bundle (SLING-3574)
Hi,
I have implemented a JDBC DataSource Bundle which which configures and
registers a DataSource services based on OSGi configuration. it uses
Tomcat JDBC pool [1] as the backing Connection Pool
1. Supports configuring the DataSource based on OSGi config wihich rich metatype
2. Supports deploying of JDBC4 Driver as independent bundles and not as fragment
3. Exposes the DataSource stats as JMX MBean
Refer to [2] for further details
Would it be ok to add this bundle as part of contrib (SLING-3574) [3]?
Chetan Mehrotra
[1] http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
[2] https://github.com/chetanmeh/sling-datasource
[3] https://issues.apache.org/jira/browse/SLING-3574
Re: JDBC DataSource Bundle (SLING-3574)
Posted by Robert Munteanu <ro...@lmn.ro>.
On Mon, May 19, 2014 at 12:25 PM, Chetan Mehrotra
<ch...@gmail.com> wrote:
> Hi Robert,
>
> On Mon, May 19, 2014 at 2:30 PM, Robert Munteanu <ro...@lmn.ro> wrote:
>> Not having looked at the code, I'm curious how this differs from pax-jdbc [4]?
>
> Pax JDBC implements the OSGi org.osgi.service.jdbc.DataSourceFactory
> [5] spec. Its primary focus is to expose DataSourceFactory for various
> drivers. A user can then use the DSF api to programatically construct
> the DataSource instance
>
> The proposed bundle instead aims to declarativly create the DataSource
> instance based on OSGi config. The client code just need to obtain the
> DS via DI. It has following features
Ah, I see. Thanks.
Robert
>
> 1. A DataSource service backed Connection Pool which can be directly
> used in production
> 2. Enable configuring the various DataSource properties via OSGi config
> 3. Self contained and
>
> This bundle can leverage the Pax Bundles to obtain Driver
> instance/native DataSource instance and then wrap it with the
> Connection Pool
>
> Chetan Mehrotra
> [5] http://www.osgi.org/javadoc/r4v42/org/osgi/service/jdbc/DataSourceFactory.html
--
Sent from my (old) computer
Re: JDBC DataSource Bundle (SLING-3574)
Posted by Chetan Mehrotra <ch...@gmail.com>.
Hi Robert,
On Mon, May 19, 2014 at 2:30 PM, Robert Munteanu <ro...@lmn.ro> wrote:
> Not having looked at the code, I'm curious how this differs from pax-jdbc [4]?
Pax JDBC implements the OSGi org.osgi.service.jdbc.DataSourceFactory
[5] spec. Its primary focus is to expose DataSourceFactory for various
drivers. A user can then use the DSF api to programatically construct
the DataSource instance
The proposed bundle instead aims to declarativly create the DataSource
instance based on OSGi config. The client code just need to obtain the
DS via DI. It has following features
1. A DataSource service backed Connection Pool which can be directly
used in production
2. Enable configuring the various DataSource properties via OSGi config
3. Self contained and
This bundle can leverage the Pax Bundles to obtain Driver
instance/native DataSource instance and then wrap it with the
Connection Pool
Chetan Mehrotra
[5] http://www.osgi.org/javadoc/r4v42/org/osgi/service/jdbc/DataSourceFactory.html
Re: JDBC DataSource Bundle (SLING-3574)
Posted by Robert Munteanu <ro...@lmn.ro>.
Hi Chetan,
On Mon, May 19, 2014 at 11:56 AM, Chetan Mehrotra
<ch...@gmail.com> wrote:
> Hi,
>
> I have implemented a JDBC DataSource Bundle which which configures and
> registers a DataSource services based on OSGi configuration. it uses
> Tomcat JDBC pool [1] as the backing Connection Pool
>
> 1. Supports configuring the DataSource based on OSGi config wihich rich metatype
> 2. Supports deploying of JDBC4 Driver as independent bundles and not as fragment
> 3. Exposes the DataSource stats as JMX MBean
Not having looked at the code, I'm curious how this differs from pax-jdbc [4]?
Robert
>
> Refer to [2] for further details
>
> Would it be ok to add this bundle as part of contrib (SLING-3574) [3]?
>
> Chetan Mehrotra
>
> [1] http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html
> [2] https://github.com/chetanmeh/sling-datasource
> [3] https://issues.apache.org/jira/browse/SLING-3574
[4]: https://ops4j1.jira.com/wiki/display/PAXJDBC/Pax+JDBC
--
Sent from my (old) computer