Doubt with Séssions Javaee

Asked

Viewed 56 times

2

It is possible to get a list of Sessions open? Not the quantity (sessionlistener), but the very Sessions for me to find values in your attributes.

  • I even tried to get better, but still I hope the question’s lacunae doesn’t stop her from staying open.

  • 2

    @user18511, to the best of my knowledge there is no direct way to get all sessions open, at least not with the API standard (depending on your container / application server this may be possible through JMX / internal Apis). That being said, nothing prevents you from using a SessionListener to feed a Concurrentmap or something like that with sesisons active.

1 answer

1

There’s nothing specific in the API for this, as already commented by Anthony. I think the reason is quite simple: it would be a huge security breach.

Is there how you store shared information from applying, which is a global value rather than a Session, which is a context per user.

The rule is: share in Session what is individual, create application variables for what is shared.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.