Whenever I copy a new version of the extension over the old one I can see that the new extension gets loaded... however, I immediately start seeing errors in the logs.SmartFoxServer 2X provides Extensions hot-redeploy which can be very useful during the development phases. When this feature is turned on (see the Custom configuration paragraph above), the server will monitor your Extension folders and reload your code when a jar file is modified.
All you need to do is configure your Java IDE to build or copy the jar file directly under the Extension folder in your SmartFoxServer path, and you will have a one-click deploy system.
After investigation, it appears an object of mine that held a value before now is null.
In my main extension I have this :
Code: Select all
private ConcurrentHashMap<Integer,GameRoom> gameRooms = new ConcurrentHashMap<Integer,GameRoom>();While debugging, I trace out this each request :
Code: Select all
System.out.println("GameRooms : "+this.gameRooms);Code: Select all
GameRooms :{2=GameRoom@62073b74}Code: Select all
12:39:33,060 INFO [Thread-4] managers.SFSExtensionManager - Reloading extension: { Ext: MPBTGTD, Type: JAVA, Lev: ZONE, { Zone: MPBTGTD }, {} }
GameRooms :{}Am I missing something? Maybe I assumed players could keep playing their games while I hot deployed the extension.... and maybe you can't.
Any help would be greatly appreciated!