Saving temporary data to be sharted by all extensions

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
eyal
Posts: 35
Joined: 29 Nov 2009, 11:18

Saving temporary data to be sharted by all extensions

Post 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.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

How about objects in memory?
Or files?
Lapo
--
gotoAndPlay()
...addicted to flash games
eyal
Posts: 35
Joined: 29 Nov 2009, 11:18

Post by eyal »

How can I share object that lives in the memory? Can ii use static variables?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

What language do you use on the server side?
Lapo
--
gotoAndPlay()
...addicted to flash games
eyal
Posts: 35
Joined: 29 Nov 2009, 11:18

Post by eyal »

I'm using Java
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply