ISAPI HTTPAPI server with TROInMemorySessionManager - missing sessions when calling concurrently

Hi Remobjects

I am using “RemObjects SDK for Delphi 10.0.0.1585” and Delphi 12.2 + (ROHttpApiDispatcher, ROHttpApiSimpleAuthenticationManager, ROInMemorySessionManager)

I have a weird (and specific) issue when calling the method resposinsible for “CreateSession;” multiple times in parallel (Login) - sessions are lost. Meaning that if I call “.GetAllSessions” sessions will be missing from that list returned.

Everything runs/works nicely if I run it sequentially…

The same server compiled as Windows application does not have this issue with concurrency.

Are there special consideration with ISAPI and session management that I need to factor in?

Thanks in advance
Christian

Hi,

I know one issue with ISAPI: you should manually assign SessionManager and EventRepository in code like

constructor TService.Create(aOwner: TComponent);
begin
  SessionManager := ServerDataModule.SessionManager;
  EventRepository := ServerDataModule.EventRepository;

Can you create a simple testcase that reproduces this case, pls?
You can drop it to support@ for keeping privacy.

I’ll review what is wrong.

Thank you for quick reply!
test case has been sent to : support@

Hi,

TROInMemorySessionManager should be put into separated TDataModule like

  TDataModule2 = class(TDataModule)
    ROInMemorySessionManager: TROInMemorySessionManager;
  end;

otherwise it was created several times in each TServerWebModule