I have a jRDC2 app where the server is of course written using B4J. Everything is working fine, but every 10 minutes the server needs to delete some rows from a PostgreSQL table.
1) Is there a way to make
Req.GetSession.SetAttribute("LastCheckExpiredSessions", DateTime.Now)
global so it can be accessed by any session instead of just the current session? If so, then I can check this attribute whenever Handle finishes handling a request to see if 10 minutes has expired from the last time the expired session rows were deleted. A user may be connected for only 30 seconds at a time then leaves, so I can't depend on a user ever being connected for as long as 10 minutes.
2) Is there an event that gets triggered if a session gets expired?
3) I thought of using a Timer that executes every 10 minutes on the server but of course this may interfere with the server handling incoming requests.
Can someone point me in the right direction?
TIA