You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Mike Thomsen <mi...@gmail.com> on 2018/07/28 12:51:48 UTC

Dynamically loading JARs and using them with a controller service

Is there a good example somewhere that shows how to use
dynamicallyModifiesClasspath on the PropertyDescriptor and use it add new
JARs that are available to the controller service?

Thanks,

Mike

Re: Dynamically loading JARs and using them with a controller service

Posted by Mike Thomsen <mi...@gmail.com>.
Thanks, Mike. I figured out that it was the test framework that was giving
me some trouble there. When I ran it live, it was fine. So the work around
that I did was this (in case anyone wants to do something similar):

1. Built a sample JAR file from a maven project that would roughly
approximate the sort of class I want to load.
2. Add it as a test dependency in the POM.
3. Used the dependency plugin to copy that to target/test-lib so I could
set the property to "target/test-lib/something-1.7.1.jar"

Then the "dynamic class loading" would work just fine with the maven test
cycle.

Mike

On Mon, Jul 30, 2018 at 4:19 PM Michael Moser <mo...@gmail.com> wrote:

> Hey Mike,
>
> As long as it's a controller service PropertyDescriptor that uses
> dynamicallyModifiesClasspath, check out the JMSConnectionFactoryProvider in
> the nifi-jms-bundle.
>
> -- Mike
>
>
> On Sat, Jul 28, 2018 at 8:52 AM Mike Thomsen <mi...@gmail.com>
> wrote:
>
>> Is there a good example somewhere that shows how to use
>> dynamicallyModifiesClasspath on the PropertyDescriptor and use it add new
>> JARs that are available to the controller service?
>>
>> Thanks,
>>
>> Mike
>>
>

Re: Dynamically loading JARs and using them with a controller service

Posted by Michael Moser <mo...@gmail.com>.
Hey Mike,

As long as it's a controller service PropertyDescriptor that uses
dynamicallyModifiesClasspath, check out the JMSConnectionFactoryProvider in
the nifi-jms-bundle.

-- Mike


On Sat, Jul 28, 2018 at 8:52 AM Mike Thomsen <mi...@gmail.com> wrote:

> Is there a good example somewhere that shows how to use
> dynamicallyModifiesClasspath on the PropertyDescriptor and use it add new
> JARs that are available to the controller service?
>
> Thanks,
>
> Mike
>