3

I'm using Google AppEngine with their built in web server. My development goes about in a simple way: I make changes to my .java sources or .jsp and compile using ant and to see the changes I have to restart the development server.

I'm wondering if there's a way I can avoid this last step of restarting my development server - somehow refresh the cached classes context of my web-server. The options provided by Google on this dev server are quite limited and am wondering if there's a better way.

I would like to avoid using something like JRebel which I could buy, but for this simple project I'm just wondering if I can remove the burden of restarting my web-server... otherwise I'll live with it.

Luca Matteis
  • 29,161
  • 19
  • 114
  • 169

2 Answers2

4

I realized that you can just touch appengine-web.xml to force server context reload. Also loading the page under /_ah/reloadwebapp will reload the servers context - even if it gives you a 404, it will still reload the context.

Luca Matteis
  • 29,161
  • 19
  • 114
  • 169
  • /_ah/reloadwebapp - don't get confused by 404 error, later realized that its reloading, even after 404 error. – Palani Jun 29 '12 at 14:16
0

In debug mode, the JVM can perform some hot swapping - I know and Intellij IDEA does it, i m sure other debuggers in other IDE's does it too.

Start the app server with the debug flag (-Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8000 for example), then connect the debugger to the app server.

Then, make a change to the source that is not a method signature or class field change. Recompile, and voila, the debugger hot swapped the class into the jvm being debugged!

This only really works semi-well. But it may just be enough.

Chii
  • 14,540
  • 3
  • 37
  • 44
  • I attached jdb to the 8000 port where the dev_appserver is listening (I made it listening by changing the dev_appserver.sh script). Still, compiling my java sources dont have effect on my webserver. restarting dev_appserver works though. – Luca Matteis Mar 10 '11 at 15:37
  • i dont think jdb (the java debugger that comes with java?) does this? Not sure - you'd have to look up the doco for it. I doubt it does. its a pretty basic debugger imho. – Chii Mar 12 '11 at 03:30