This content has been marked as final.
Show 1 reply
-
1. Re: Using Infinispan in place of Session
rhusar Oct 18, 2013 4:56 AM (in response to umesh.awasthi)I am trying to understand if i can use Infinispan to store my Shopping Cart data in place of HTTP Session?
Yes, you can. You can define a cache in the AS container, inject it to your EE application and access the cache directly and do anything you need.
Store it in DB (which i am doing ) and fetch it every time user want to look in to it.
The performance aspect should be solvable by using Hibernate 2nd level cache which uses Infinispan. You don't want to fetch from DB every time.
In case any change in Cart, update DB and update snapshot in Session or cache.
That doesn't sound reasonable to me. For instance you cannot effectively change the session as that event happens.