Skip to content

Commit

Permalink
Merge pull request #8684 from stuartwdouglas/config-inject-infinispan
Browse files Browse the repository at this point in the history
Change embedded Infinispan to use config injection
  • Loading branch information
geoand authored Apr 20, 2020
2 parents e5fdb52 + ab140aa commit c232cab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.annotations.ExecutionTime;
import io.quarkus.deployment.annotations.Record;
import io.quarkus.deployment.builditem.ApplicationIndexBuildItem;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
Expand All @@ -49,8 +47,6 @@
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.infinispan.embedded.runtime.InfinispanEmbeddedProducer;
import io.quarkus.infinispan.embedded.runtime.InfinispanEmbeddedRuntimeConfig;
import io.quarkus.infinispan.embedded.runtime.InfinispanRecorder;

class InfinispanEmbeddedProcessor {
@BuildStep
Expand Down Expand Up @@ -203,10 +199,4 @@ private void addReflectionForName(String className, boolean isInterface, IndexVi
classInfos.stream().map(ClassInfo::toString).toArray(String[]::new)));
}
}

@Record(ExecutionTime.RUNTIME_INIT)
@BuildStep
void configureRuntimeProperties(InfinispanRecorder recorder, InfinispanEmbeddedRuntimeConfig runtimeConfig) {
recorder.configureRuntimeProperties(runtimeConfig);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Inject;
import javax.inject.Singleton;

import org.infinispan.commons.CacheConfigurationException;
Expand All @@ -25,11 +26,8 @@
@ApplicationScoped
public class InfinispanEmbeddedProducer {

private volatile InfinispanEmbeddedRuntimeConfig config;

public void setRuntimeConfig(InfinispanEmbeddedRuntimeConfig config) {
this.config = config;
}
@Inject
InfinispanEmbeddedRuntimeConfig config;

@Singleton
@Produces
Expand Down

This file was deleted.

0 comments on commit c232cab

Please sign in to comment.