plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Dywicki <l...@code-house.org>
Subject [DISCUSS] Enriched driver context for plc4j
Date Wed, 14 Oct 2020 16:19:07 GMT
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