Having been put off writing Java components a number of times I've decided to really
tackle the problem head on. I would greatly appreciate any help in this.
I've been following the advice in
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents and I have compiled a
Jar identical to the Hello World example except that the class and method names differ,
hopefully consistently. I've placed the jar in XE_WAR_HOME/WEB-INF/lib and written a
page, which consists only of
{{velocity}}
$services.mycomponent.greet()
{{/velocity}}
The output when viewed is simple "$services.alertdb.greet()", so nothing seems
to have happened. However, if I restart Tomcat (and then wait a minute or so for XWiki to
restart) the output is "Hello", as desired.
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.
Also, is a restart necessary when I update the Jar, either with fixed methods or modified
interface?