sihem hcine
asked on
Session in java desktop
Hi developers ,
Please anyone know if we can create a session-like mechanism in java desktop application?
i am going to develop a java desktop application which has a log-in mechanism to ensure only authorized people can access stored information. I wanna ask if there is any mechanism to do something like session.
Please anyone know if we can create a session-like mechanism in java desktop application?
i am going to develop a java desktop application which has a log-in mechanism to ensure only authorized people can access stored information. I wanna ask if there is any mechanism to do something like session.
ASKER
i don't understand
Hi Siehem,
I would like to first brainstorm on why do you need a session for a desktop application.
Session is typically needed in multi user scenarios like in web server.
A web sever may have multiple users to connect to and then the server needs to keep track of some information for each users.
If your desktop application is a standalone one with no server side and it is used by multiple users in a same machine. Then you don't need a typical session implementation since at a time one user can log in . The whole JVM memory snapshot will belong to the user itself. The user information can turn be in securely in a DB or if any Identity provider you have.
In case your desktop application connects to server. Then again it is a single user application in client side with whole JVM memory snapshot to the user and server in turn can use its own session mechanism.
So bottom line is for a desktop based application you don't need any session like mechanism since user has the whole JVM memory snapshot is available to him/her.
Please let me know if you need any further information.
Best Regards,
Saurav
I would like to first brainstorm on why do you need a session for a desktop application.
Session is typically needed in multi user scenarios like in web server.
A web sever may have multiple users to connect to and then the server needs to keep track of some information for each users.
If your desktop application is a standalone one with no server side and it is used by multiple users in a same machine. Then you don't need a typical session implementation since at a time one user can log in . The whole JVM memory snapshot will belong to the user itself. The user information can turn be in securely in a DB or if any Identity provider you have.
In case your desktop application connects to server. Then again it is a single user application in client side with whole JVM memory snapshot to the user and server in turn can use its own session mechanism.
So bottom line is for a desktop based application you don't need any session like mechanism since user has the whole JVM memory snapshot is available to him/her.
Please let me know if you need any further information.
Best Regards,
Saurav
ASKER
Hi , Saurav ,
Thankx veryy muuuch for your explanation.
So , in my app i have client side and server . Many clients can connect on the server , then in the app any client can upload file in the server . Iwant get the information of the client who uploads that file. Now am storing file information in a batabase. Bt i wonder if there is something more professional like a session to get user information more rapidely
Thankx veryy muuuch for your explanation.
So , in my app i have client side and server . Many clients can connect on the server , then in the app any client can upload file in the server . Iwant get the information of the client who uploads that file. Now am storing file information in a batabase. Bt i wonder if there is something more professional like a session to get user information more rapidely
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You might be better off with a 'kiosk' interface to the machine on which you plan to run it