Page 1 of 1

Saving temporary data to be sharted by all extensions

Posted: 18 Jan 2010, 09:07
by eyal
Hi.
How can SFS hold a temporary data which must be shared by all of the extensions of the same zone without using a database?
Thanks,
Eyal.

Posted: 18 Jan 2010, 11:00
by Lapo
How about objects in memory?
Or files?

Posted: 18 Jan 2010, 11:16
by eyal
How can I share object that lives in the memory? Can ii use static variables?

Posted: 18 Jan 2010, 11:22
by Lapo
What language do you use on the server side?

Posted: 18 Jan 2010, 11:46
by eyal
I'm using Java

Posted: 18 Jan 2010, 13:36
by Lapo
A singleton would be a good option.
Singletons, however require some extra care because they need to be seen globally by all Extensions which are loaded in separated class loaders.

You can read more details here:
http://forums.smartfoxserver.com/viewtopic.php?t=6395