OpenLiberty httpSessionCache configuration server.xml
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java, redis
- Domain
- backend, databases, documentation
Research direction
Start with the linked Open Liberty httpSessionCache reference and the server.xml and redis-config.yaml examples in the report. Determine how Redisson JCache vendor-specific properties are passed and whether environment-based values are supported; the documentation is complete when it gives an accurate configuration example or clearly states the limitation.
Written by the indexing model from the issue text.
Description
I am trying to use redisson as jCache implementation for the httpSessionCache of my open liberty server.
So far, I've managed to use the library by providing a configuration yaml file like so:
<!-- server.xml -->
<library id="jCacheVendorLib">
<fileset dir="${shared.resource.dir}" includes="*"/>
<folder dir="${shared.resource.dir}" />
</library>
<httpSessionCache libraryRef="jCacheVendorLib" uri="file:${server.config.dir}/redis-config.yaml" />
My goal is to provide the redis uri and password using environment variables. The open liberty docs state, that I should be able to provide a "list of vendor-specific JCache configuration properties, which are passed to the JCache provider when the CacheManager is obtained" (see here )
My naive approach was to provide those properties with the same keys as I would in the yaml file:
<!-- server.xml -->
<variable name="redis.uri" defaultValue="redis://localhost:6379"/>
<variable name="redis.password" defaultValue=""/>
<library id="jCacheVendorLib">
<fileset dir="${shared.resource.dir}" includes="*"/>
<folder dir="${shared.resource.dir}" />
</library>
<httpSessionCache libraryRef="jCacheVendorLib">
<properties singleServerConfig.address="${redis.uri}"/>
<properties singleServerConfig.password="${redis.password}"/>
</httpSessionCache>
This unfortunately failed with
[INFO] [ERROR ] SESN0307E: An exception occurred when initializing the cache. The exception is: java.lang.IllegalStateException: Default configuration hasn't been specified!
[INFO] at org.redisson.jcache.JCacheManager.createCache(JCacheManager.java:119)
[INFO] at com.ibm.ws.session.store.cache.CacheHashMap.cacheInit(CacheHashMap.java:192)
[INFO] at [internal classes]
Is this approach feasible or is there another way of achieving an environment variable based configuration?
Is there some piece of documentation specifying the "vendor-specific JCache configuration properties"?
Thanks a lot
Max
- Dominant language
- Java
- Stars
- 24.4k
- Forks
- 5.5k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 20
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from redisson/redisson
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
IndexOutOfBoundsException in ContainsDecoder.decode from lock watchdog renewal (mutable args list aliased)Possibly taken @ronitgupta138 claimed this 45 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
Maintainers usually reply within 2 days
-
skipResult() batch decoding can consume subsequent command replies and corrupt response alignmentMay be free again @Exar-lab claimed this 9 days ago, and no pull request is open. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
redisson/redisson#7446 · 2 comments ·
Maintainers usually reply within 2 days
-
RLock after a master switch: READONLY is retried, every retry runs the lock script on the new master, and tryLock() still throws the first READONLYPossibly taken @wozhenbang2004 claimed this 36 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 2 days
All issues in redisson/redisson
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
avaje/avaje-metrics#142 ·
-
As a developer using gamma, I would like a click-to-copy button for the client credentials, so it is easier to copy themPossibly taken @Portals claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Lincoln-cn/JAiRouter#1473 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
exercism/java-analyzer#379 ·