Link to home
Start Free TrialLog in
Avatar of sihem hcine
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.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

That would be difficult as it would be difficult to secure. Where would you store the credentials? You could maybe store them elsewhere and authenticate to them using https but even that's subvertible.
You might be better off with a 'kiosk' interface to the machine on which you plan to run it
Avatar of sihem hcine
sihem hcine

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
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
ASKER CERTIFIED SOLUTION
Avatar of Saurav Sarkar
Saurav Sarkar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial