Woodsman
Woodsman

Reputation: 1179

Resource file not reloading

My goal is to substitute JRebel with DCEVM/Hotswap for a Tomcat project built with Maven. I believe it is detecting my class file changes and handling them appropriately. However, it is not detecting resource changes.

I started with the assumption that it would load everything that the JVM normally would. Next, I added a hotswap-agent.properties file, and have not gotten that to work either.

hotswap-agent.properties

extraClasspath=
watchResources=src/main/resources
LOGGER=debug

I also tried watchResources= and watchResources=true

It's not clear to me what the format of "watchResources" should be.

For IP reasons, I cannot paste the full log file in a public forum, but did see this:

HOTSWAP AGENT: 14:21:27.546 DEBUG (org.hotswap.agent.util.classloader.WatchResourcesClassLoader) - Watching directory 'file:/C:/Software/src/main/resources' for changes.
HOTSWAP AGENT: 14:21:27.547 INFO (org.hotswap.agent.watch.nio.TreeWatcherNIO) - Registering directory target C:\Software\src\main\resources via watched: C:\Software\src\main\resources
HOTSWAP AGENT: 14:21:27.547 DEBUG (org.hotswap.agent.watch.nio.TreeWatcherNIO) - WATCHING: ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY - fileTree,high C:\Software\src\main\resources

Interestingly, my files are not under C:\Software\src\main\resources, but rather something like C:\Repos\myproject\src\main\java and c:\Repos\myproject\src\main\resources.

If it matters, the resource is a MyBatis mapper XML file.

I'd like some message that says it detected a change in the resource and an appropriate message.

Upvotes: 0

Views: 758

Answers (0)

Related Questions