session logout

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
Zdeno Bielik
Posts: 147
Joined: Thu Jan 28, 2010 9:24 am
Location: Nitra, Slovakia
Contact:

session logout

#1 Post by Zdeno Bielik »

Hi Roger,

I want at EndOfSession call function DeleteNonActiveItems(), but I don’t know,
what event and where in cxp code I must check/test it.

In attached example I have workaround, that I call it at start-up of cxp file.
Other solution may be also call this function from desktop version of app in needed interval in background thread.
Or next solution may be simple app with few lines of code something like in testDNAI.prg...

BUT, there are some problems or limitations of these solutions:
it will only works, if desktop or resident app will be running or any other web user will open web page...

So I want/need any solution, which will call that function, when SessionManager will close session and also delete all variables/assigning to NIL values,
because it may be very long time, when some of these situations occurs
and logged users or reserved items/products are still blocked
and no one other can work with them until they are unblocked...

Zdeno
Attachments
test05.zip
(3.1 KiB) Downloaded 679 times

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: session logout

#2 Post by rdonnay »

Zdeno -

This is one of the reasons I prefer writing my own web server using WebHandler rather than using IIS or Apache.
A running thread could handle cleanup like this.

CXP maintains session management data in databases so it is persistent.

I haven't looked at your sample yet.
I will try to do so later today.
I am still working on the PSTest01.cxp IIS problem.
I have found out how to get it to compile now, but there is still an IDSC error when PSInit() is called.
The eXpress train is coming - and it has more cars.

Post Reply