Srinivasa Reddy
Srinivasa Reddy

Reputation: 101

Concurrent user restriction in a web application

What is the best way to restrict concurrent user access in any web application?

Existing problem:

We have different reports in our web application. if one user is accessing any report we must not allow other users to access the same report. How can we achieve this?

Proposed solution:

Is this approach the best or is there any better approach? What are the best ways we can achieve this?

Upvotes: 1

Views: 1251

Answers (1)

svachon
svachon

Reputation: 7716

I am not sure if by reports you mean some screen in your web application. In that case, you could create a table in a database to track user access to reports. A user can access a report only if it is available or own by him. A report gets freed when the user leaves the screen or his session ends, you can create a session listener and a context listener that cleans up ownership of reports.

Upvotes: 2

Related Questions