Opsss, temp_folder is the solution more closest that I already have... I suppose I can create a temp_folder in my product and store in this folder a object that contains this variables. I'm going to check this solution... A lot of thanks El mié, 05-02-2003 a las 15:50, Casey Duncan escribió:
On Wednesday 05 February 2003 09:15 am, Oliver Bleutgen wrote:
Antonio Beamud Montero wrote:
Hi all: Well, i have a serious problem... I have defined a variable inside my product that I refresh periodically via XML-RPC (every ~1 min). I need to maintain this variable volatile because ZODB grows to the infinite... The problem arises when a new conection is established an the variable value need to be shown. In some cases the query raises an AttributeException. Now I catch this exception, but this no solves my problem... Why the value of this variable is lost?
Since nobody responded till now, here are my 5c. Volatile attributes are only guaranted to exist as long a transaction AFAIK, OTOH they are also not guaranted to _not_ exist longer, which might explain that you don't see this failure everytime.
Volatiles (_v_ variables) are thread-specific. A request handled by one thread won't see volatiles created on another thread.
So, I fear volatile attributes can't help you here.
How I can solve the problem?
Hmm, an external method which stores the values in a file? A external database? The sessioning stuff?
Sorry, I have no really good idea there, maybe it helps if you explain what you want to do in more detail ...
You can use sessions, but they are user-specific. If it needs to be global to all users, create a persistent class and store an instance in the temp_folder (which is where the seesion data is stored). That is a volatile storage shared between all threads. It will only be lost if Zope restarts.
hth,
-Casey -- Microsoft merges technologies: Windows CE + Windows ME + Windows NT = Windows CEMENT
---- Antonio Beamud Montero Agora Systems S.A. http://www.agoratechnologies.com