2

I am working on application which is simple J2EE application with JSPs and servalts.

Architecture of application,

enter image description here

So as you can see this is very old structural design of application which is governed by database. Now I want to restrict more then one user to access one application at a time.

Only one user can open and application and modify data at a time.

I have come up with approach might not be a solution,

enter image description here

Here what i want to do,

  • When user opens application add record in database with this application is access by this user with flag is lock.
  • Each time any action happens on app with user update timestamp.
  • Now there is no action on app. till 10 to 15 min. update record with Unlock.
  • so next user comes and try to access this app. and compare timestamp then can see that its been over 15 min. So will allow to access app.

is this is a best solution ?

or you guys can suggest best approach to solve this problem. Kip in mind that only tech we have is POJOs, JSPs, Servlates, And Database (DB2).

Like to here good ideas from you guys.

Thanks in advance.

mustaccio
  • 18,234
  • 16
  • 48
  • 57
JBaba
  • 590
  • 10
  • 30
  • Looks ok. Just make sure that situation when user goes off keyboard for more than X (e.g., 15) minutes and then returns to submit his data, only to find out he's been kicked out of server, so that this situation is accounted for somehow in your design (e.g., by having per-user backups or by dismissing such use-case as a non-issue altogether) – Victor Sorokin Mar 26 '15 at 21:14
  • 1
    @VictorSorokin we have logic where session timer popup will come and notify user about application is going to logout after some time. – JBaba Mar 26 '15 at 21:28

0 Answers0