Skip to content

Commit

Permalink
Merge pull request #29 from project-kessel/RHCLOUD-35414-Relations-cl…
Browse files Browse the repository at this point in the history
…ient-broken-quarkus

Add no-args contructors for abstract constructors to support quarkus client injection.
  • Loading branch information
merlante authored Sep 26, 2024
2 parents 9177c84 + b516d14 commit 607e2d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/main/java/org/project_kessel/clients/KesselClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ public abstract class KesselClient<A extends AbstractAsyncStub<A>, B extends Abs
protected A asyncStub;
protected B blockingStub;

/***
* No args constructor to support synthetic creation of no-args constructor in CDI in impls for normal scope bean
* proxying. Supports producers (@Produces) of @ApplicationScoped beans in containers like Quarkus.
* (https://github.com/quarkusio/quarkus/issues/22669#issuecomment-1006147659)
*/
protected KesselClient() {

}

protected KesselClient(A asyncStub, B blockingStub) {
this.asyncStub = asyncStub;
this.blockingStub = blockingStub;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
import io.grpc.Channel;

public abstract class KesselClientsManager {
protected final Channel channel;
protected Channel channel;

/***
* No args constructor to support synthetic creation of no-args constructor in CDI in impls for normal scope bean
* proxying. Supports producers (@Produces) of @ApplicationScoped beans in containers like Quarkus.
* (https://github.com/quarkusio/quarkus/issues/22669#issuecomment-1006147659)
*/
protected KesselClientsManager() {

}

protected KesselClientsManager(Channel channel) {
this.channel = channel;
Expand Down

0 comments on commit 607e2d5

Please sign in to comment.