Opening an application in separate tabs of a single browser and data crossover
Hey all, I was wondering what the implications are of opening the same application in multiple tabs? Here are some more details: - The application has security and does not allow for anonymous users - It’s an app that relies on associations with the session and a key field on persistent entities that links those entities with a given non-persistent entity. – Essentially we have a signature entity with a ‘OrderNumber’ field. The signature is only session based, so it is associated with the session with delete behavior of the signature if the session is deleted. The main non-persistent entity is the Order, and has a unique number to identify it. When we retrieve the signatures for display we do it by retrieving the signature using the session association and the ‘OrderNumber = $Order.Number’ key. What we’re seeing is weird behavior when attempting to retrieve these signatures. Sometimes we get cross over from other Orders, but only when a single user has the application open in multiple tabs of the same browser. I’m guessing this has to do with the way we’re associating signatures with the session. Has anyone else run into this? Should Mendix be able to handle these situations, or is it not meant to be used in this way?
As far as I know when opening the same app with the same account in the same browser in a different tab, the session is the same. When you log out in one tab, you will be logged out in the other.
Though refresh of the tabs is not the same. If you trigger a microflow with a refresh client, my experience is that the tab which triggers the microflow is refreshed and the other tabs won’t even if the same page is opened with the same data.
could be that this last behavior is related to your issue.
Rene van Hofwegen
Hey, in general, Mendix advises not to associate lot of objects with Session. Because, it will lead to performance issues too.
The reason is, all the associations will remain active till the session is active.