Hot deploy issue


Sometimes hot deploy is not working. Don’t know if this is because I upgraded IDEA to 2017.1.14. However there is likely an issue anyway within Studio because the time displayed in the log is 2 hours late.

In attached screenshot you can see Studio time in log and the time of my machine.

Another question on the matter. If I change code of a static method, and I can see the class redeployed, will the static method code be effectively replaced ? That was an issue some time ago.



1 Like

the time is a non-issue. You see UTC times in the logs, so they are always 2 hours behind your local time. Try changing your computer’s timezone to UTC, and you’ll see they match.

Regarding hot loading, it works only for a limited set of changes. It works well for UI xml changes (web module) and for changes in fields and instance methods of screen’s controllers.
It doesn’t work for any other change in your code (core/global changes, static methods etc.), so be prepared to reload the server as much as possible (when in doubt, always reload).



Not sure why you see UTC time in the messages. Maybe because of explicit setting it for JVM via user.timezone property. To eliminate the time as a possible reason, make sure Studio, Tomcat and your OS work in the same timezone.

Regarding what can be hot deployed.

  1. What works:
  • XML descriptors and screen controllers (including static methods), located in web and gui modules
  • Middleware service implementations, located in core module
  1. What doesn’t work:
  • Any classes of the global module, including middleware service interfaces
  1. Other UI and middleware classes and beans, including their static methods, hot deployed ONLY IF some class from item 1 has also been changed. The reason for this is that class reloading is started by some signal: for screen controllers it is the screen reopening, for services - Studio generates special trigger file that is recognized by server and used to reload particular service class and all its dependencies.

So in general, while you work with the UI layer code and service implementations, you don’t have to restart the server. However, item 3 may bring some confusion. If you change entities, entity listeners, service interfaces or other classes on middleware or in the global module, you should restart even if you see “Hot deploy” message in Studio log.

Ok thanks to both of you for the clarifications. I’ve spent quite some time scratching my head trying to understand what was hot deployed or not. Anyway, when I really need it for my own classes, I connect to JVM in debug, which allows hot code swap in most cases.

This clarification would deserve a small additional sentence on this page :

PS : The time issue has gone away, not sure why, because I always launch stuff the same way. Anyway it’s gone.

This can be close