I usually create my service implementation classes via
TRORemoteDataModule which makes it easier to configure it, via the form designer.
Out of habit, I always have a
SessionManager service with
RequiresSession set to
false and providing the
I then have all my other services set
true which forces my clients to call
SessionManager.StartSession before doing any actual work with the other services.
This is proving quite a discomfort because the sessions expire and some clients end up getting
SessionNotFoundException exceptions which they are not capable of handling. I could modify the clients to ping on a regular basis, or make them cope with the exception, but I’d rather solve this server side.
As such, I looked at my services implementation and I have two situations:
- Nothing is stored into the session
- The service is used as the client event receiver
In the first case, I can simply set
false and clear the value of the
But in the second case, I believe that I still need the session for the events to work. However, setting
false does not seem to have any undesirable effect. I know the session is recreated by
TRORemoteDataModule.DoOnActivate every time it is needed, but I’m wondering if I’m safe with leaving
false while still having assigned a proper value to
SessionManager. What is your take on this?