infinispan-spring-boot | Infinispan Spring Boot starter | Model View Controller library
kandi X-RAY | infinispan-spring-boot Summary
kandi X-RAY | infinispan-spring-boot Summary
From Infinispan 12, the Infinispan Spring-Boot starter is shipped with
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- The default cache manager
- Gets config xml
- Gets the cluster name
- Bind metrics
- Creates the averages
- Computes the memory usage
- The remote cache manager bean
- Gets the client properties
- Binds metrics to the API
- Sets the metrics
- Checks if cache type is defined
- The number of hits in the cache
- Returns the eviction count
- Exclude the remote cache manager mbean
- Gets the miss count
- Set the cluster properties
- Returns the number of stores
- Returns the number of elements in the cache
- The eviction count
- Returns the number of hits in the cache
- The size of the cache
- Gets the meter binder
- Returns the size of this cache
- Gets the configuration builder
- Gets the meter binder for the given cache and tags
- Sets the SASL properties
infinispan-spring-boot Key Features
infinispan-spring-boot Examples and Code Snippets
Community Discussions
Trending Discussions on infinispan-spring-boot
QUESTION
My app uses Infinispan's Spring Session implementation via the Infinispan Spring Boot Starter. I am using the embedded mode via InfinispanEmbeddedHttpSessionConfiguration
. The Spring Session integration documentation is pretty sparse, and it doesn't mention anything about the recommended cache mode for the session cache.
I have been using the DIST_SYNC mode, but I notice occasional ConcurrentModificationException
errors in the log. Is there a more appropriate cache mode, or could this be a bug?
I am using Spring Boot 2.2.10, Infinispan 9.4.20 and Spring Session 2.2.0. The app runs under JDK 11.
Edit
The exception I observe in the logs is below. I've put xxx.
in place of my company's package names for our filters.
The exception occurs when the same session is reused in quick succession, in particular when our external security vendor runs weekly scans on our app. The exception does not occur every week. When it does occur, it leads to an eventual OutOfMemory error on the node that did not get the ConcurrentModificationException
. The heap is full of TrianglePerCacheInboundInvocationHander$1
objects.
I have tried to reproduce the error in our development environment by running concurrent requests for 3 days, but to no avail.
I've looked at the Infinispan Spring Session code, and I see that each request gets its own instance of MapSession
, materialised from the serialised data stored in Infinispan. I don't see how multiple concurrent requests for the same session could cause the ConcurrentModificationException
, and I'm not aware of anywhere in my app that would allow concurrent access to a MapSession
instance from multiple threads.
ANSWER
Answered 2021-Feb-16 at 09:59Using the DIST_SYNC mode for sessions should be fine.
If a ConcurrentModificationException
is thrown while serializing a session attribute, then it's a sign that the application is modifying an attribute value after inserting it in the session, and it should not do that.
If a ConcurrentModificationException
happens while serializing the session itself, then it's likely a bug in the Infinispan Spring Session integration.
Same if the ConcurrentModificationException
is not related to serialization at all. I suggest posting the full stack trace in your question, or registering an account for the Infinispan Zulip Chat and posting the exception there.
As a final note, Infinispan 9.4.20 is pretty old, and an eventual bug fix is probably going to land only in Infinispan 12.x.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install infinispan-spring-boot
You can use infinispan-spring-boot like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the infinispan-spring-boot component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page