Thomas Vedel

Member since: Thursday, 18 September 2014
Last login: 4 years ago
Profile viewed: 1,315 views

Your Rank: 89
Points: 5

Thomas Vedel is friends with Jens Fudge

Thomas Vedel replied to the topic 'Stateless DataSnap REST server timeout issue' in the forum. 7 years ago

Hi,
Most of your questions are answered in the wiki: http://docwiki.embarcadero.com/RADStudio/Berlin/en/Tutorial:_Using_a_REST_DataSnap_Server_with_an_Application_and_FireDAC
You should note the following, however

  • Server side: Set the FireDAC datasets FetchOptions.Mode to fmAll to ensure that the full result set is transfered to the client
  • Client side: Set the FDMemTables CachedUpdates property to true. Otherwise is the ChangeLog not maintained, and the FDMemTables are hence unable to know what has been updated.
  • Server side in ServerContainerUnit1: The TDSServerClass components LifeCycle property should be set to Invocation to ensure that the server is stateless. I think you alredy did that?
  • Client side in ClientModuleUnit1: Set the DSRestConnection1.PreserveSessionID property to False to prevent the client to re-use session ID's. I thnk you already also did that?

Regards
Thomas

PS: Please note that I am not in any way connected to Embarcadero, except for being a long-time customer :)

Read More...

Thomas Vedel replied to the topic 'Stateless DataSnap REST server timeout issue' in the forum. 7 years ago

Freddy B11742 wrote:

My probem is that I don't have TDSRestConnection.
Then you have not created a REST client, but probably an ordinary DataSnap client.
When creating a client application for a REST server, you should add a DataSnap REST Client Module to your client, and not a DataSnap Client Module.
If you by error add a DataSnap Client Module, the connection will be a SQLConnection instead of a DSRestConnection.
To ensure that you cannot do this (i.e. the server only supports pure REST clients), you can check the Simplified Dispatcher option in the wizard when creating the server.


Read More...

Thomas Vedel replied to the topic 'Stateless DataSnap REST server timeout issue' in the forum. 7 years ago

Leo wrote:

I preserve some data in the session (TDSSessiongManager.GetThreadSession.GetData/PutData).
If you want to handle state (which you do), the proper solution is to choose a server that preserves state, i.e. you should set the lifecycle to something else than "Invocation".

Read More...

I can recommend using the IcoFX tool developed by IcoFX Software - a small Romanian-based software company.All tasks related to creating icons can be performed using the tool. It is able to create not only icons for use in Windows, but handles icons

Thomas Vedel replied to the topic 'Stateless DataSnap REST server timeout issue' in the forum. 7 years ago

Problem solved: When connecting to a stateless DataSnap REST server (i.e. having the TDSServerClass components LifeCycle property set to "Invocation"), the TDSRestConnection components PreserveSessionID should be changed to "False" (it defaults to True).
At the same time, the TDSHTTPWebDispatcher components SessionTimeout could preferably be set to a somewhat lower value than the default of 1200000, resulting in the server preserving the SessionID in 20 minutes.

Read More...

Thomas Vedel created a new topic ' Stateless DataSnap REST server timeout issue' in the forum. 7 years ago

If you create a stateless REST server clients still can timeout showing the following error message: "HTTP/1.1 403 Session has expired."
The error is shown on the client if a client is left running (just leave the client running without using it) for a longer period than set by the SessionTimeout parameter of the TDSHTTPWebDispatcher component in WebModule1.
The error is shown even if the LifeCycle property of the TDSServerClass is set to 'Invocation', which should result in a stateless server.
I really hope that anyone have a suggestion to cure / work around the problem. Otherwise this is a major issue since stateless REST servers are recommended by Embarcadero for use when connecting from mobile clients because of its better handling of connection issues; however this seams not to be the case.

Read More...

Thomas Vedel started a new discussion The new "Community Toolbar" in... 7 years ago

The XE8 Update 1 IDE is featuring a Community Toolbar in the upper right corner of the IDE. The "Upcoming Events" is showing "old events", and not "future events"...