[英]How to Implement Session in a Desktop Java Swing Application that connects with an online database
I have a Java Swing Application that contains multiple Jpanel's with queries inside to manipulate data that is found on a mysql online database. 我有一个Java Swing应用程序,其中包含多个Jpanel,内部带有查询以处理在mysql在线数据库中找到的数据。 I need a mechanism to implement session to this application so I can log out the user when his idle.
我需要一种机制来实现与此应用程序的会话,以便我可以在用户空闲时注销该用户。 Also am searching if i can store user activities when he's using the application in db table for example so I can go through them if something happen and know what the user has done!
也正在搜索我是否可以在用户使用活动存储例如他在db表中的应用程序时存储我的活动,以便在发生某些事情时可以通过它们来了解用户的活动! I know how to do the db part but I need someone to tell me how I can implement the SESSION and get the USER ACTIVITIES
我知道如何做数据库部分,但是我需要有人告诉我如何实现SESSION并获得用户活动
thanks 谢谢
您可以创建一个具有静态属性的类,以在用户连接时存储用户信息,还可以在用户表中添加一个包含用户状态的字段,当用户连接到在线状态时,否则将断开用户与状态线的连接
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.