Domanda

potrebbe accontentare qualcuno di condividere la sua esperienza su questo argomento?

Quando si utilizza jpda su Tomcat, il ricaricamento delle classi funziona anche per le classi caricate tramite spring?Diciamo che ho un contesto primaverile con un paio di classi caricate e istanziate e voglio cambiare un metodo in una di esse.

In generale, la classe viene sostituita, ricaricata e ogni altra istanza viene istanziata dalla nuova versione della classe.Suppongo che anche le vecchie istanze vengano sostituite con quelle vecchie?

Funziona anche quando si utilizza la primavera?Quindi ho un controller mvc e cambio il suo metodo?

Oppure devo usare JRebel per questo requisito.

È stato utile?

Soluzione

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).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top