문제

could please anybody share his experience about this topic ?

When using jpda on tomcat, does class reloading work even for classes loaded via spring ? Let say that I have spring context with couple of classes loaded and instantiated and I want to change a method in one of them.

In general, the class is replaced, reloaded and every other instance is instantiated from the new version of the class. I suppose that even the old instances are replaced with the old ones ?

Does this also work when Spring is used ? So that I have a mvc controller and I change its method ?

Or do I have to use JRebel for this requirement.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top