Hello!
I have read a lot information about horribe Class Loader and want to ask advice about SFS2X.
I have GameZoneExtension.
And FightExtension - game room extension.
When user connects and login to GameZoneExtension it loads from DB information about user character and creates instance of GameCharacter class and fill it with loaded info.
Each new room with FightExtension should be able to get every user GameCharacter instance from GameZoneExtension.
So I should put jar with GameZoneExtension and FightExtension {SFS2X-DIR}/SFS2X/extensions/game/ and jar with GameCharacter to {SFS2X-DIR}/SFS2X/extensions/__lib__/. Am I right?
And every time I changed GameCharacter (or any other model class) I should restart SFS2X to apply changes?
P.S. So what for extension auto reloading? For simple server-side projects?
Classes between Extensions
-
2morrowMan
- Posts: 8
- Joined: 04 May 2009, 21:27
- Contact:
The idea is explained in the docs here:
http://docs2x.smartfoxserver.com/Advanc ... extensions
In order to share data across extensions that are segregated in terms of class loading, you should put your Model interfaces in the lib/ folder and always work with those interfaces.
Extensions should be kept in extension/ folder otherwise the reloading won't work.
http://docs2x.smartfoxserver.com/Advanc ... extensions
In order to share data across extensions that are segregated in terms of class loading, you should put your Model interfaces in the lib/ folder and always work with those interfaces.
Extensions should be kept in extension/ folder otherwise the reloading won't work.
-
2morrowMan
- Posts: 8
- Joined: 04 May 2009, 21:27
- Contact: