Questions tagged [jcache]

JCACHE :JSR 107- Java Temporary Caching API. Specifies API and semantics for temporary, in-memory caching of Java objects, including object creation, shared access, spooling, invalidation, and consistency across JVM's. source: https://jcp.org/en/jsr/detail?id=107

Introduction

Cache is the API being defined in JSR107. It defines a standard Java Caching API for use by developers and a standard SPI ("Service Provider Interface") for use by implementers.

Maven Dependency:

<dependency>
    <groupId>javax.cache</groupId>
    <artifactId>cache-api</artifactId>
    <version>1.0.0</version>
</dependency>

Gradle dependency:

compile 'javax.cache:cache-api:1.0.0'

The specification is available online.

184 questions
1
vote
2 answers

Cache key issues with Jcache

I am using JSR107 caching with Springboot. I have following method. @CacheResult(cacheName = "books.byidAndCat") public List getAllBooks(@CacheKey final String bookId, @CacheKey final BookCategory bookCat) { return <
1
vote
0 answers

JCache Infinspan creates immortals on entry update

While using JCache (Infinispan) on Wildfly 10.1 I stumbled against the following issue. I created a new cache (test-cache) where I used CreatedExpiryPolicy with a duration of 5 minutes. After playing around with the cache I noticed that if I put…
maroswal
  • 96
  • 6
1
vote
1 answer

Declarative cache container setup — is it possible?

I'm using Wildfly 10.1.0 + Infinispan 8.2.4.Final + cache API 1.0.0 trying to enable Infinispan Jcache Interceptors in my application with minimum efforts, with no programmatic setup if possible. I wanted to make such an annotation work to store…
dfche
  • 3,403
  • 2
  • 24
  • 32
1
vote
1 answer

Access underlying type definition in Ignite cache

Is there any way I can get the underlying key and value type definition of the cache that is created by some other code? At this point of time I only know the cache name. I don't have any other information about how the cache was…
James Isaac
  • 2,587
  • 6
  • 20
  • 30
1
vote
1 answer

Infinispan: how to invoke EntryProcessor asynchronous?

Does Infinispan provide this kind functionality similar like Hazelcast(IMap#submitToKey) or Ignite(IgniteCache#invokeAsync)?
1
vote
1 answer

Clear cache in Apache Ignite every n seconds

How do we empty the cache every n seconds (so that we can run queries on the data that has come in for the n second window - batch window querying)? I could only find FIFO and LRU based eviction policies in the ignite code where the eviction policy…
James Isaac
  • 2,587
  • 6
  • 20
  • 30
1
vote
2 answers

Lock on a key in a hazelcast cluster

I am writing a distributed application using Hazelcast(JCache standard) for caching. I have an use case where I should put a lock on specific key in a cluster to prevent from calls during updating. thread1: get item1 for a config change(put a…
Forin
  • 1,549
  • 2
  • 20
  • 44
1
vote
0 answers

Hazelcast 3.8 module and configuration possibility for wildfly 10.1?

I like to prototype a JEE environment with Wildfly 10.1 and Hazelcast 3.8. Until now I only have experience with ancient JBoss 4.2.3.GA. I already found existing resource adapter implementation based on older hazelcast 3.6 under…
1
vote
1 answer

JCache: programmatically build replicated cache based on declarative configuration

I use JCache and Infinispan as its implementation. JCache does not provide any API related to clustering, so I defined simple replicated cache configuration in XML configuration file:
briarheart
  • 1,906
  • 2
  • 19
  • 33
1
vote
2 answers

How to instantiate Ignite CacheManager with programmatic configuration / without XML

I want to create an Ignite node with a programmatic configuration. A javax.cache.CacheManager object is required for the application. I know that I can start an Ignite node with the following code: //with XML…
1
vote
2 answers

Hazelcast and JCache in Spring Boot creates two instances

It looks like the default Spring boot auto configuration will create two hazelcast instances when using JCache and caching is enabled (@EnableCaching) Full example at: https://github.com/dirkvanrensburg/hazelcast-springboot-jcache TLDR; Is there…
dvanrensburg
  • 1,351
  • 1
  • 14
  • 21
1
vote
2 answers

Service with name'hz:impl:cacheService' not found

I am write my hazelcast prototype code. I encountered the following error when running the reader. Not sure what did I miss. SEVERE: [host1]:5701 [dev] [3.7.3] Service with name'hz:impl:cacheService' not found! com.hazelcast.core.HazelcastException:…
johnsam
  • 4,192
  • 8
  • 39
  • 58
1
vote
1 answer

How to ignore max idle seconds but keep ttl in Hazelcast JCache?

I am trying to use Hazelcast 3.7.x (latest as of this writing) JCache provider and declarative configuration (for the benefits with threading etc.). I need to just set time-to-live-seconds but not max-idle-seconds for my use case. I need to keep the…
Noname
  • 21
  • 4
1
vote
2 answers

Jcache and Hibernate L2 together

I have checked Jcache specification and my understanding is that it gives you more flexibility in terms of loading and removing objects from the cache but you have to write your own data access. Hibernate L2 cache is great to cache data from RDBMS…
Hulk
  • 152
  • 3
  • 10
1
vote
0 answers

How to convert cache.ccf to javax.cache.Configuration

I recently set up my first JCS cache which persists my Serializable objects to local disk (so that I can restart my application and continue using the cache, etc.). I used JCS directly but I'd like to use javax.cache (jcache) instead but I'm having…
mfulton26
  • 29,956
  • 6
  • 64
  • 88