diff --git a/infinispan-client-quickstart/src/main/java/org/acme/infinispan/client/InfinispanClientApp.java b/infinispan-client-quickstart/src/main/java/org/acme/infinispan/client/InfinispanClientApp.java index f7d8a07f5a..6e2e5e761a 100644 --- a/infinispan-client-quickstart/src/main/java/org/acme/infinispan/client/InfinispanClientApp.java +++ b/infinispan-client-quickstart/src/main/java/org/acme/infinispan/client/InfinispanClientApp.java @@ -4,24 +4,21 @@ import javax.enterprise.event.Observes; import javax.inject.Inject; +import io.quarkus.infinispan.client.Remote; import io.quarkus.logging.Log; import org.infinispan.client.hotrod.RemoteCache; -import org.infinispan.client.hotrod.RemoteCacheManager; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import io.quarkus.runtime.StartupEvent; @ApplicationScoped public class InfinispanClientApp { - @Inject - RemoteCacheManager cacheManager; + @Remote("mycache") + RemoteCache cache; void onStart(@Observes StartupEvent ev) { Log.info("Get cache named mycache and add put a key/value"); - RemoteCache cache = cacheManager.getCache("mycache"); cache.put("hello", "Hello World, Infinispan is up!"); } } diff --git a/infinispan-client-quickstart/src/main/resources/application.properties b/infinispan-client-quickstart/src/main/resources/application.properties index a7e6aa6067..509ead383b 100644 --- a/infinispan-client-quickstart/src/main/resources/application.properties +++ b/infinispan-client-quickstart/src/main/resources/application.properties @@ -1,5 +1,3 @@ -quarkus.infinispan-client.cache.mycache.configuration= - # Use the Infinispan Dev Service in dev and test %prod.quarkus.infinispan-client.server-list=localhost:11222 %prod.quarkus.infinispan-client.auth-username=admin