Hi all,
I'm trying to integrate Shiro into an existing web application, but there are
some issues with regards to session handling:
Whenever I call session.getAttribute(key) I get a new instance of the
associated object, so even inside the same request consecutive calls
to getAttribute return different objects. Is this the intended behavior, or is
there something wrong with my configuration?
We are using Cassandra for session storage (with a SessionDAO similar to the on
described by Les in his shiro+cassandra blogpost)
For illustration (sess being the httpSession), this returns an empty list:
1: ArrayList<String> myList = sess.getAttribute("MYLIST");
2: if(null == myList){
3: myList = new ArrayList<String>();
4: sess.setAttribute("MYLIST", myList);
5: }
6: myList.add("dummy");
7: return sess.getAttribute("MYLIST");
Thank you for your help,
kind regards
Thorsten