I’m having a problem with sessions:
RO is not releasing expired sessions. I need to call some method, like ClearSessions(true) to do the job ? or it was supposed to be automatic ?
I’m using my custom class session (implementing event OnCustomCreateSession).
simplified code:
// module
procedure TModule.createSessionManager;
begin
// Manager
mySessionManager := TROInMemorySessionManager.Create(nil);
mySessionManager.OnCustomCreateSession := createSessionEvent;
mySessionManager.SessionDuration := 1; //test 1 min
end;
procedure TModule.createSessionEvent(const aSessionID: TGUID; var Session: TROSession);
begin
Session := TMySession.Create(aSessionID);
end;
// my custom session class
destructor TMySession.Destroy;
begin
…
// never shows logs…
Log.Add(‘Session destroyed’);
inherited;
end;
// my service
constructor TMyService.Create(aOwner : TComponent);
begin
SessionManager := mySessionManager;
…
end;
Thanks,
Willian.