Tovio,

I've used a Database service with nifi at work and just wanted to give some
input with how it was implemented.  I'm not sure if it was done with best
practices in mind and I'm sure Mark and Joe can add some input on that part.

All configuration was done in the controllerservices.xml in the conf
directory.  This includes the jdbc driver
("oracle.jdbc.driver.OracleDriver"), database url, username, password, and
a name for the connection.  Database pooling was then done, I think through
c3po, using the Class.from("oracle.jdbc.driver.OracleDriver") approach.
This connection was then selected from SQL processors to use from a
dropdown by getting the controller service created and setting the
connections available as acceptable options.

I was also looking at approaching this ticket and feel the implementation
will affect how the ExecuteSQL processor(s) down the road will be
implemented.  I've thought about and use the service fairly often so if you
want to discuss it further I'm all for it.

Chad

On Sun, Feb 22, 2015 at 10:45 AM, Mark Payne <[email protected]> wrote:

> Toivo,
>
>
> Answers below, inline.
>
>
> Unfortunately, I don’t really have a lot of recommendations here, but I
> didn’t want to leave you hanging without responding to the e-mail. Anyone
> else have any recommendations?
>
>
> Thanks
>
> -Mark
>
>
>
>
>
>
> From: [email protected]
> Sent: ‎Saturday‎, ‎February‎ ‎21‎, ‎2015 ‎9‎:‎19‎ ‎AM
> To: [email protected]
>
>
>
>
>
> I'd like to start implementing this.
>
> 1. Is the /nifi-standard-services right place?
>
> >> I think this is a good place.
>
> 2. There are several Database Connection Pool implementations available.
> Is Apache Commons DBCP suitable?
> http://commons.apache.org/proper/commons-dbcp/
>
>
> >> This should be fine, assuming that the licensing is okay.
>
>
> 3. Service should be database independent.  So JDBC driver configuration
> and
> loading should be dynamic. Any recommendations and considerations how do to
> it?
>
> >> I haven’t given this service enough thought to really provide any
> answer to this personally, but any specific questions I’d be happy to help
> with. I think I would have to refresh myself a bit on JDBC connectivity to
> provide much insight here.
>
> What should be taken into account when implementing service?
> >> As above, I haven’t given this service enough thought to really provide
> any answer here.
>
>
> Toivo
>
>
>
>
> --
> View this message in context:
> http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/New-Database-Connection-Pooling-Controller-Service-tp582p796.html
> Sent from the Apache NiFi (incubating) Developer List mailing list archive
> at Nabble.com.
>

Reply via email to