Search code examples
javajvmhotswapjvmtidcevm

Hot Swap agent Configuration for multi module project



I need help in configuring hotswap agent in my project for hot deploying class files.
In my project we have project setup like below :

WebProject (war)
|
|_ _ Service Project(jar)


Service project is used as a jar file in web project. So whenever I do changes in a java file inside service project i want hotswap agent to reload/replace its class file with the latest one without the need of deploying the entire project again.

I have downloaded dcevm(dynamic code evolution vm) for jdk 1.7.51 and hotswap-agent.jar file as well and also done eclipse configuration. Whenever I do changes in WebProject's .java, .properties files it reloads it automatically without deploying the application again. Now I just want to configure my hotswap agent in such a way that If i am doing changes in java file inside service project which is used as a jar file inside Web Project, it should reload that .class file or .jar file again.

Do I need to add one more hotswap-agent.properties file in resource folder of service project? Currently i have added it in resource folder of web project.

Any help is very much appreciated.


Solution

  • I have configured hot swap agent for multi module project. In Web project i have added hotswap-agent.properties file. In hotswap-agent.properties file added path to the service projects target directory like this

    extraClasspath=D:/Sample/serviceproject/target/classes

    and now it is reloading files from above mentioned directory.