I would rather store session id in http session rather than the session itself and use a kind of object store for keeping the sessions until they are persisted into the db so on redirects you can still acess it. But why not persisting it (in other words use JPAKnowledgeService) directly?
HTH