felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Whytock <dwhyt...@gmail.com>
Subject Re: Connect a bundle to a data base
Date Wed, 21 Mar 2012 18:38:07 GMT
On Wed, Mar 21, 2012 at 12:17 PM, Christian Schneider
<chris@die-schneider.net> wrote:
> I also wondered if I should start writing something like this. The problem
> is that DataSources and in the same way jms ConnectionFactories are
> configured
> very differently. It is not only a url and usernam, password in some cases.
> So this can be quite complicated.

It can be done somewhat generically, with the service either having
custom configuration methods for each DBMS, or alternately having a
generic method that returns a configuration POJO structured for the
DBMS.

It can also be done similar to how Apache Camel does it, with a fully
configurable URI; the required driver would be the resource type, and
whatever values are needed can be specified as URI parameters.  Of
course, Camel has an endpoint pool and a locator to connect user to
endpoint.

For a first-pass solution, I think I'd go with the POJO.

> This solution is extremly simple and I think good enough for most
> situations. So while it would be nice to have a service like you described I
> did not really miss it till now.

Understood.  The biggest argument for what I described is probably
getting away from third-party packages.  I tend to go barebones to
avoid complicated dependencies and keep my footprint small.

Of course, if someone wrote something like this and it became
sufficiently established, it would be a third-party package itself...

Don

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message