Hello everyone!
My question is whether it is possible to make it so that several users can simultaneously access and use the web application at once (multisession, I think this is called) both when launched on a localhost and already when deployed to a remote server. If so, how can this be done by Spring for my web application developed using this framework + Hibernate ? He himself did not find the necessary information.

It would be nice to provide an example in the XML version, because at this stage I will use this method of configuration description for frameworks.

PS Question on the topic. Do I need to change something in this hibernate.cfg.xml parameter or can I leave it as is?

<property name="connection.pool_size">1</property> 

Thanks in advance!

  • 2
    In Spring MVC, it's out of the box. - Nofate

1 answer 1

In spring-mvc this is implemented out of the box. Everything should work as is.

And on the topic of the pool_size parameter, this is sort of like the size of the pool of connections to the database, weakly related to the main issue, but you can set it to be 5-10 for sure, this will be more than enough.

  • I deployed the application on localhost: 8080 and I cannot log in in different tabs under different users and use the application in this mode. If I’m on one tab, I’ll log in as a single user, then all other tabs will also go to the last logged in user. So maybe the means to solve this problem can be given out of the box, but I do not know how to properly configure everything and ask for an example in the XML version. - IngeniousTom
  • one
    @IngeniousTom The fact that you enter from different tabs does not make absolutely no weather. You have one session. Give spring-mvc a chance to justify yourself and try logging in under other users in incognito-chrome mode or another browser. those. one tab in chrome, one in incognito, one in another browser and check the result. - Victor
  • And how to make the sessions were a lot, so that you can log in in different tabs of the same browser? This is what interests me. - IngeniousTom
  • 2
    @IngeniousTom minute, in "VKontakte" you can log in under several people in different tabs of your browser? - Victor
  • one
    It is to blame - there is no such possibility in VK. Then I will just test in different browsers. Thanks for the answer! - IngeniousTom