views:

354

answers:

2

You can perform hot deploy when you have native Java code on Jetty.

This allows you, for example, to make changes to your servlet code without requiring a restart of the server to see your application changes.

However, if you run a scripting language on top of Java - Groovy, JRuby, Jython - you can no longer perform hot deploy (at least on Jetty).

What could be the technical reason for this?

+2  A: 

I can think of two reasons:

  1. If only your script has changed, how does your application know it has to reload the scripts? They are handled as normal resources. The container does not know that a servlet has to be redployed because of a change in the resources.
  2. Another possibility is that you store the ScriptEngine in the servlet as an instance variable. So the servlet cannot be replaced because of this dependency on the instance object which cannot be reconstructed.
Bruno Ranschaert
Clever answer. Thanks.
Chris Collins
A: 

Have you ever evaluate JavaRebel? They calim that hor deployment is their business (works well under Tomcat have to work under Jetty as well).

FoxyBOA