[Architecture Board] Clean up SPI to provide implementations
See original GitHub issueMany MP specs provide an SPI for implementations to provide implementations of some API interfaces. Usually, the following pattern is used:
- CoreInterface interface in the root API package
- a CoreInterfaceResolver abstract class in an SPI package
- a static resolver method which provides a default CoreInterface instance
- the resolver method uses the service loader mechanism to load a CoreInterfaceResolver implementation which provides an instance of CoreInterface
- alternatively, CoreInterfaceResolver implementation can also be set globally with a static
setInstance
method (to simplify providing an implementation in an OSGi environment)
Several issues have been raised to remove the setInstance
method from the API artifact, claiming that separating it into an SPI package within the same artifact isn’t enough to prevent API consumers using it: https://github.com/eclipse/microprofile-rest-client/issues/103, https://github.com/eclipse/microprofile-open-api/issues/224, https://github.com/eclipse/microprofile-config/issues/364
Issue Analytics
- State:
- Created 5 years ago
- Comments:21 (8 by maintainers)
Top Results From Across the Web
Hardware SPI: Issues i discovered and potential solutions (API ...
I have spent endless nightly hours with the ESP and Logic analyser to figure out how the HW SPI bus is working and...
Read more >Introduction to SPI Interface - Analog Devices
This article provides a brief description of the SPI interface followed by an introduction to Analog Devices' SPI enabled switches and muxes, ...
Read more >A Design Methodology for Implementation of Serial Peripheral ...
The SPI is a full-duplex, synchronous, serial data link that enables communication between a host processor and peripherals. The Serial ...
Read more >Serial Peripheral Interface (SPI) - The Linux Kernel Archives
SPI is the “Serial Peripheral Interface”, widely used with embedded systems because it is a simple and efficient interface: basically a multiplexed shift ......
Read more >How to build a SPI Flash Controller for an FPGA - ZipCPU
First, flash memory is non-volatile, so anything that reads from it can do so immediately upon power up. Second, most FPGA's need a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No @rmannibucau the link @starksm64 posted is the setInstance method. Afaiu this merhod is not needed anymore, nowhere. Not even in mp-config. It is purely for ancient OSGi containers and not needed anymore with more modern OSGi service discovery. We should clarify this with a few OSGi experts and have them provide feedback.
The point you likely mean is that mp-config is probably a rare example which cannot be CDI-first as it is needed during container startup already. This is actually a separated topic and we should split those 2 up in 2 tickets.
In today’s architecture meeting there was agreement that this issue can now be closed