Pregunta

¿Podría alguien compartir su experiencia sobre este tema?

Cuando se usa jpda en tomcat, ¿la recarga de clases funciona incluso para las clases cargadas a través de Spring?Digamos que tengo un contexto de primavera con un par de clases cargadas e instanciadas y quiero cambiar un método en una de ellas.

En general, la clase se reemplaza, se recarga y todas las demás instancias se instancian desde la nueva versión de la clase.¿Supongo que incluso las instancias antiguas se reemplazan por las antiguas?

¿Esto también funciona cuando se usa Spring?¿Entonces tengo un controlador mvc y cambio su método?

O tengo que usar JRebel para este requisito.

¿Fue útil?

Solución

My experience with this is that it works well and reliably, provided you don't of course change the method signature, add fields etc. Changing the implementation of any existing method of any class in the spring container (MVC controllers included) should work entirely as expected. For reference, the last time I tested this was with Tomcat 6, Spring 3 and using Netbeans 6.9's "Apply Code Changes" over a remote attached debugger, but it's Java standard so I doubt the IDE will effect it much.

EDIT: None of the above concerns JRebel (I've never used it).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top