java login/logout on localhost -
this desktop application uses jdbc:mysql://localhost/
database.
long story short, i`m trying do:
- ask credentials (username/password).
- compare mysql database match (true/false).
- if true → load workspace, implements data mysql.
- if false → keep asking valid credentials.
as of now, i`m thinking of using cardlayout approach.
schema simple:
- if true → switch
workspace_card
.
- set mysql table field (
user_status
) 1 (meaning online).- logout → switch
login_card
.
- set mysql table field (
user_status
) 0 (meaning offline).
so, question is:
- may cardlayout considered approach when comes low level security type of applications?
- what accurate schema/method use in javaworld achieve above tasks/results?
i guess stoting user online/offline status in database , manahe through application in bad approach. in cases, such of application/database process shutdown, force shutdown , others, logout logic may not executed, , user_status
left online.
in typical java web application use web session (which 1 storing credentials) , jdbc pool (like bonecp or c3p0). have desktop application, may use jdbc pool , need make kind of session storing user status/credentials
Comments
Post a Comment