What is the difference between Service Provider Interface (SPI) and Application Programming Interface (API)?
More specifically, for Java libraries, what makes them a
In the Java world, different technologies are meant to be modular and "pluggable" into an application server. There is then a difference between
Two examples of such technologies are JTA (the transaction manager) and JCA (adapter for JMS or database). But there are others.
Implementer of such a pluggable technology must then implement the SPI to be pluggable in the app. server and provide an API to be used by the end-user application. An example from JCA is the ManagedConnection interface which is part of the SPI, and the Connection that is part of the end-user API.