HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.25k stars 482 forks source link

Not reloading i18n message bundles and mybatis xml mappers. #443

Open luceat-lux-vestra opened 1 year ago

luceat-lux-vestra commented 1 year ago

I want reload message_{locale}.properties! and hopefully mybatis xml mappers too.

My Setup:

I tried hotswap-agent.properties like #252 but no luck.

and also doesn't reload mybatis xml mappers.

Please help.

skybber commented 1 year ago

What framework are you using? Probably resource bundle reloading is not supported in the appropriate HA plugin, but it could be very easily done in similar way how it is in case of Mojarra or MyFaces:

https://github.com/HotswapProjects/HotswapAgent/blob/master/plugin/hotswap-agent-mojarra-plugin/src/main/java/org/hotswap/agent/plugin/mojarra/MojarraPlugin.java#L105

luceat-lux-vestra commented 1 year ago

I didn't notice what you really said, especially not supported in the appropriate HA plugin. No one is interested in this I guess because no response even though 2 months later.

That means I need to implement that..., I hope I can.


@skybber I'm using Spring MVC with JSP.

I guess I need to do like this. Is it right?


Do I need to do something to use Mojarra or MyFaces plugin? then please let me know. I didn't disabled any plugin and according to log, it seems loads all plugins but no effect.

HOTSWAP AGENT: 20:16:21.789 INFO (org.hotswap.agent.config.PluginRegistry) - Discovered plugins: [Hotswapper, WatchResources, AnonymousClassPatch, ClassInitPlugin, JdkPlugin, Hibernate, Hibernate3JPA, Hibernate3, Spring, Jersey1, Jersey2, Jetty, Tomcat, ZK, Logback, Log4j2, MyFaces, Mojarra, Omnifaces, ELResolver, WildFlyELResolver, OsgiEquinox, Owb, Proxy, WebObjects, Weld, JBossModules, ResteasyRegistry, Deltaspike, GlassFish, Weblogic, Vaadin, Wicket, CxfJAXRS, FreeMarker, Undertow, MyBatis, IBatis, JacksonPlugin, Idea]