0

My company choose scaleoutsoftware/SOSS as the in-memory cache solution. It is working fine with SpintBoot. Currently, we are migrating all our SprintBoot applications to Quarkus. I cannot get scaleoutsoftware/SOSS work in Quarkus. Seems Quarkus cannot load or process the Jcache configuration in the application.yml. Really appreciate any comments or suggestion.

This is Quarkus configuration (application.yml):

    quarkus:
      cache:
      type: jcache
      jcache:
         provider: com.scaleoutsoftware.soss.cache.ScaleoutCachingProvider

This is my code:

@Autowired
private javax.cache.CacheManager cacheManager;

This is error I get when I start up Quarkus:

[error]: Build step io.quarkus.arc.deployment.ArcProcessor#validate threw an exception: javax.enterprise.inject.spi.DeploymentException: javax.enterprise.inject.UnsatisfiedResolutionException: Unsatisfied dependency for type javax.cache.CacheManager and qualifiers [@Default]
- java member: com.***.cache.DataCacheManager#cacheManager
- declared on CLASS bean [types=[com.***.cache.DataCacheManager, java.lang.Object], qualifiers=[@Default, @Named(value = "dataCacheManager"), @Any], target=com.***.cache.DataCacheManager]
  • Quarkus doesn't support JCache. Where did you find the configuration snippet you use? – Ladicek May 01 '23 at 15:02
  • Hi Ladicek, thanks for reply. I just use the same JCache structure of Sprint in the Quarkus configuration. When I start Quarkus, it doesn't complain about this configuration. So I thought JCache is supported in Quarkus – user1601373 May 01 '23 at 20:11
  • Hi Ladicek, could you show me where I can find the information/link about Quarkus doesn't support JCache. I need to show that to our team. Thanks! – user1601373 May 01 '23 at 20:13
  • There is no information about Quarkus supporting JCache, therefore, Quarkus doesn't support JCache. If you grep the Quarkus codebase for `jcache`, you don't find anything, which is also a strong hint that the support just isn't there :-) Quarkus supports in-memory caching with Caffeine and out-of-process caching with Redis. It should be possible to write your own implementation for SOSS, or perhaps use SOSS's Redis compatibility with Redis-based caching. – Ladicek May 02 '23 at 07:26
  • I just realized I forgot that there's also an extension for remote caching with Infinispan, though that doesn't implement the Quarkus caching API, it exposes the Infinispan API directly (so can't use the Quarkus caching annotations). Using the SOSS API directly should also work well. – Ladicek May 02 '23 at 08:28
  • Thanks a lot Ladicek. The information is really helpful! – user1601373 May 03 '23 at 15:04

0 Answers0