I understand the draw backs but it still would be nice to be able to do it, with the understanding if the server crashes i lose the current enviroment the use has created. I'm willing to take that risk, because it makes creating the business logic far simpler because i don't have to have two code bases one for desktop applications and one for foxweb with slight changes to make it work with a statless application.
Here is a thought.
how about having another application control and hold onto activeX and other class objects on the server so if the channels crash they simply restart and then request the object latter.
Or you could try creating wrapper around the creation of objects somthing like
then you could store all the above stuff to a table in the proper order so if the channels crash you can recreate it.
Or you could use the object.SaveAsClass method which saves a object in memory into vcx file as is, with all it properties and events
So what i would do is on the Error event have it dump all the objects that are in memory into a vcx file then recreate them.
The only problem i see with this is if the channels crash and you an have ODBC/oledb data connection open you will have to recreate that no matter what.
But if we add an event to our Classes call it Recreate, you could look for that event then call to reset certain properties like data connections if the channels crash
Sent by FoxWeb Support on 06/11/2002 05:45:04 PM:
FoxWeb does not store session variables in memory, but rather in memo fields in a special system table. There are many reasons for this, including the fact that channels get re-started after an error occurs and they live in separate processes, so they don't share the same memory space. Storing session variables to disk also ensures that they will remain active even if you restart FoxWeb, or re-boot the server (unlike ASP).
Unfortunately, we currently don't have a way to convert VFP objects to binary blobs of data that can be saved to a table and then retrieved to re-create the original object. I don't think there's a way to do this with VFP. If any of you have other ideas, please let us know.
Sent by Justin on 06/11/2002 08:58:24 AM:
Is there a way to make the Session Object a container for User Defined objects.
something like this.
then in other web pages go get the object i created ealier without having to recreate the object.
this would make my life allot easier when building my applications in the sense that the classes i create would control all the settings and keep track of every thing and speed things up sense i don't have to recreate the object all the time and reconnect to Remote Database servers.
I also understand this would be a memory burden on the foxweb server trying to keep track of the objects in memory. but i would like it to be able to do this