Skip to content

Commit

Permalink
Merge pull request #24 from quarkiverse/23-injection-endpoints-missin…
Browse files Browse the repository at this point in the history
…g-for-default-config

Fixed bug as per issue #23
  • Loading branch information
eddiecarpenter authored Aug 21, 2024
2 parents 4de9bf6 + 9b94a78 commit ba82bd8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/project.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
release:
current-version: "2.0.0"
next-version: "2.0.1-SNAPSHOT"
current-version: "2.0.1"
next-version: "2.0.2-SNAPSHOT"
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,25 @@ public ServiceStartBuildItem generateDiameterConfiguration(DiameterRecorder reco
profile.getProfileName().equals(DiameterConfig.DEFAULT_CONFIG_NAME))
.createWith(recorder.diameterStack(shutdownContextBuildItem, tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName()))
.done());

//Handle the case where the default name is explicitly injected.
if (profile.getProfileName().equals(DiameterConfig.DEFAULT_CONFIG_NAME)) {
syntheticBeanBuildItemBuildProducer.produce(
createSyntheticBean(profile.getProfileName(),
Configuration.class,
DOTNAME_CONFIGURATION,
false)
.createWith(recorder.diameterConfiguration(tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName()))
.done());

syntheticBeanBuildItemBuildProducer.produce(
createSyntheticBean(profile.getProfileName(),
Stack.class,
DOTNAME_STACK,
false)
.createWith(recorder.diameterStack(shutdownContextBuildItem, tlsRegistryBuildItem.registry(), diameterRunTimeConfig, profile.getProfileName()))
.done());
}
});

return new ServiceStartBuildItem("DiameterService");
Expand All @@ -201,7 +220,12 @@ public void declareDiameterServicesAsBean(CombinedIndexBuildItem index, BuildPro
private static <T> SyntheticBeanBuildItem.ExtendedBeanConfigurator createSyntheticBean(String clientName, Class<T> type, DotName exposedType, boolean isDefaultConfig)
{
LOG.info("Creating Synthetic Bean to {} for @DiameterClient(\"{}\")", type.getSimpleName(), clientName);
SyntheticBeanBuildItem.ExtendedBeanConfigurator configurator = SyntheticBeanBuildItem.configure(type).scope(ApplicationScoped.class).unremovable().setRuntimeInit().addType(exposedType);
SyntheticBeanBuildItem.ExtendedBeanConfigurator configurator = SyntheticBeanBuildItem
.configure(type)
.scope(ApplicationScoped.class)
.unremovable()
.setRuntimeInit()
.addType(exposedType);

if (isDefaultConfig) {
configurator.defaultBean();
Expand Down

0 comments on commit ba82bd8

Please sign in to comment.