Get VaadinSession Object for all Sessions of current User

Is there a way to query VaadinSessions via a session ID or can I somehow list all VaadinSessions?

I would like to output the user agents and IP address of the current user’s sessions.

Example View:
image

Hi,

There is no built-in way of getting all Vaadin sessions, so you need to implement one yourself. As an inspiration you can take a look at SessionHolder.java class that will be available in the next Jmix feature release (added for this issue). In simple words, you need to subscribe on SessionInitEvent and store sessions.

Regards,
Gleb

Now I can list all sessions including user agents and hostnames.

Thank you, it works perfectly :slight_smile:

image

2 Likes