karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: AutoEncryptionSupport Thread running always?
Date Mon, 28 Mar 2016 09:21:31 GMT
Hi Fabian,

I quickly reviewed your change, and it looks good to me (I added a 
comment in the PR).

So you can merge IMHO.

Thanks,
Regards
JB

On 03/28/2016 11:19 AM, Fabian Lange wrote:
> Hi All,
> what is the desired review procedure?
> Shall I just go ahead and merge the change?
>
> Fabian
>
> On Wed, Mar 16, 2016 at 10:24 AM, Fabian Lange <fabian.lange@codecentric.de>
> wrote:
>
>> Hi Guillaume,
>> thanks for the quick reply.
>> I made a ticket (KARAF-4423) and proposed a solution in
>> https://github.com/apache/karaf/pull/164
>>
>> This also fixes the service not shutting down, because the wrong field was
>> volatile (the boolean stop flag needs to be volatile, otherwise it is
>> cached by the other thread)
>>
>> Fabian
>>
>> On Wed, Mar 16, 2016 at 9:20 AM, Guillaume Nodet <gnodet@apache.org>
>> wrote:
>>
>>> Yeah, we could make the code a bit smarter and avoid starting the thread
>>> if
>>> we know the encryption support is disabled.
>>> Checking with the following code inside a try / catch block should do the
>>> trick imho
>>>     encryptionSupport.getEncryption() != null
>>>
>>>
>>> 2016-03-16 8:36 GMT+01:00 Fabian Lange <fabian.lange@codecentric.de>:
>>>
>>>> Hi,
>>>>
>>>> is there a reason why said thread always runs?
>>>> at
>>>>
>>>>
>>> org.apache.karaf.jaas.modules.properties.AutoEncryptionSupport.run(AutoEncryptionSupport.java:78)
>>>>
>>>> in org.apache.karaf.jaas.cfg i have
>>>>
>>>> encryption.enabled = false
>>>>
>>>>
>>>> and I think that means the thread does not need to run. Reason for
>>> asking
>>>> is that I want to cut down on unnecessary threads
>>>>
>>>>
>>>> Fabian
>>>>
>>>
>>>
>>>
>>> --
>>> ------------------------
>>> Guillaume Nodet
>>> ------------------------
>>> Red Hat, Open Source Integration
>>>
>>> Email: gnodet@redhat.com
>>> Web: http://fusesource.com
>>> Blog: http://gnodet.blogspot.com/
>>>
>>
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message