plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christofer Dutz <christofer.d...@c-ware.de>
Subject Re: [DISCUSS] Enriched driver context for plc4j
Date Fri, 16 Oct 2020 07:37:57 GMT
Hi Lukasz,

could you possibly whip up a proposal in a branch ... I have to admit I don't quite understand
the problem you're trying to solve.
Perhaps being able to see what changes you propose makes this easier?

Chris



Am 14.10.20, 18:19 schrieb "Łukasz Dywicki" <luke@code-house.org>:

    Hey all,
    I have a need and also proposal to extend driver context a bit.
    Currently we miss a bit of information which is available to
    DriverManager (caller class loader) which results in inconsistent
    results for ServiceLoader.load and Class.forName calls.
    These two are mainly dependent on class loading, however I would like to
    make one step further and cover ServiceLoader with plc4j specific SPI,
    ie. ServiceResolver which could be changed depending on needs.

    My needs are coming purely from osgi landscape where class loaders are
    managed and every call to ServiceLoader or Class.forName causes
    troubles. For that reason I'd really love to find most obvious ones and
    fix them.

    What's currently unclear to me is what DriverContext is really for,
    cause base type is empty and brings very little to the table. It seems
    to be a perfect candidate to propagate class loader set in
    PlcDriverManager to drivers, but if we bring it there we have N contexts
    to update..

    Cheers,
    Łukasz

Mime
View raw message