On Sun, Nov 30, 2014 at 8:11 PM, Bryn Jeffries
<bryn.jeffries(a)sydney.edu.au> wrote:
I wrote:
> So is a restart of Tomcat always required?
This wasn't mentioned in the guide.
> And since extensions can be added via the extension manager without a restart,
> is there a sneaky trick to doing the same with my own components.
Thomas Mortagne wrote:
What you have in XE_WAR_HOME/WEB-INF/lib is
loaded by Tomcat at
startup, there is not much XWiki can do about it.
It also seems that restarting Tomcat isn't always sufficient to update a component.
I've updated the jar file a couple of times and seen the same behaviour after the
restart.
I notice that in the Tomcat docs there is a reloadable attribute for the
org.apache.catalina.Loader interface
http://tomcat.apache.org/tomcat-7.0-doc/config/loader.html
"Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and
/WEB-INF/lib for changes, and automatically reload the web application if a change is
detected. This feature is very useful during application development, but it requires
significant runtime overhead and is not recommended for use on deployed production
applications. You can use the Manager web application, however, to trigger reloads of
deployed applications on demand."
Doesn't that mean that the corresponding XWiki class could support reloading as a
configurable option?
You don't win much time by relaoding Tomcat instead of restarting it,
the purely Tomcat side is quick compared to XWiki init.
Usually the best is to test everything you can using junit (plus and
you always sleep better with a good code coverage :)) and only test a
few complex scenario hard to mock with the complete stack.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne