I'm using JbossAS 7 and I can't find a way to share session using the server configuration. I'm aware that there's a JSR defining that this should not be available.
Sorry, but doesn't ring a bell, can you link the spec you are referring to?
a) Use SAML with PicketLink and they should manage the login and security of my applications. I should use sp and idp for comunication.
Yes ,this is correct. This is the right approach, but IIUC this wont expose the HTTP session object, but just log a user withing apps or in clustered SSO, withing servers of the cluster.
See the quickstarts from picketlink on how to do this:
b) Create a jar inside ear but outside other wars. This jar would be responsible for this comunication.
Not really following, could you elaborate?
I read something about Jboss storing sessions inside Infinispan but I can't find further information.
Correct, sessions are stored in Infinispan caches. See the Infinispan subsystem configuration. This is managed by server, I don't think you want to hack around internals.
Thanks for your reply Radoslav,
actually, I was wondering in another solution for this problem.
I've mentioned Infinispan and session storing because I was thinking about sharing sessions between wars using one NoSql database.
As JBoss already contains Infinispan, it's easier to create a new Cache management and use it to share session.
What do you think about this idea?
The Infinispan new Cache created could be embedded within the ear.