Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple implementations of KieServerController through the ServiceLoader #3069

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

timhamoni
Copy link

Currently the implementation of KieServerController getController() in KieServerImpl uses the default, or the first class loaded through the ServiceLoader. This makes it difficult to override, especially as the WebSocket implementation is usually present.

This change allows multiple implementations to exist, and when they do, they are checked to see if they are supported, and are of a higher priority. The default is not instantiated automatically as this is always available to the ServiceLoader.

This change is designed to mirror the KieServicesClientProvider. However, the change could not be applied to the KieServerController interface as that is also used elsewhere in the kie-server (for example org.kie.server.controller.websocket.WebSocketKieServerControllerImpl)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant