How to tell the jetty server to reload?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

winson
Posts: 13
Joined: 06 Mar 2014, 07:08

How to tell the jetty server to reload?

Postby winson » 13 Feb 2018, 04:52

I met a problem now.

Code: Select all

public class MyExtension extends SFSExtension {
   
   private ConfigMaster configMaster;
   
   @Override
   public void init() {
   
      configMaster = new ConfigMaster();
      
   }
   
   @Override
   public Object handleInternalMessage(String cmdName, Object params) {
      
      //Here
      getConfigMaster()
      
      //somecode
      
   }

   public ConfigMaster getConfigMaster() {
      return configMaster;
   }



The problem is that when I reload MyExtension.jar,the configMaster invoke in the handleInternalMessage is still the old one.(I compared to the hashcode between the one before reload and the one after reload)

So,I want to know how to reload the jetty server to make it get the obj which after reload.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: How to tell the jetty server to reload?

Postby Lapo » 13 Feb 2018, 09:28

Hi,
your question is related to Extension, so I am not sure why you're referring to Jetty?
Jetty handles the HTTP side of SmartFoxServer.

In any case back to your question, it sounds like your Extension is not really getting reloaded.
Are you sure it is getting reloaded?
You should be able to see it in the server logs, and you can also add a log message in your init() if it helps.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 76 guests