karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabian Lange <fabian.la...@codecentric.de>
Subject Re: AutoEncryptionSupport Thread running always?
Date Wed, 16 Mar 2016 09:24:28 GMT
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

--
Fabian Lange | Performance Expert
mobil: +49 (0) 160.3673393

codecentric AG | Merscheider Straße 1 | 42699 Solingen | Deutschland

Sitz der Gesellschaft: Solingen | HRB 25917| Amtsgericht Wuppertal
Vorstand: Michael Hochgürtel . Mirko Novakovic . Rainer Vehns
Aufsichtsrat: Patric Fedlmeier (Vorsitzender) . Klaus Jäger . Jürgen Schütz

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/
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message