You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jean-Baptiste Quenot <jb...@apache.org> on 2006/12/01 19:10:03 UTC
Reload Java Classes for Improved Developer Experience
Here it is, the experimental patch is available for you to test
(be sure to take the most uptodate however):
https://issues.apache.org/jira/browse/WICKET-126
Basically, this patch against branch 1.x allows reloading the
Wicket application upon a class file change. As soon as a Java
class is updated in the classes directories, the corresponding
application is reloaded by Wicket. Also, bookmarkable pages are
properly reloaded.
To enable this feature, use:
<filter-class>wicket.protocol.http.ReloadingWicketFilter</filter-class>
Instead of:
<filter-class>wicket.protocol.http.WicketFilter</filter-class>
Or if you use the servlet:
<servlet-class>wicket.protocol.http.ReloadingWicketServlet</servlet-class>
Instead of:
<servlet-class>wicket.protocol.http.WicketServlet</servlet-class>
This feature works out-of-the-box with « mvn jetty:run ». With
the Eclipse Jetty launcher, you have to tweak a little bit the
project build settings to avoid exporting target/test-classes.
The locations where to find Java classes can be overriden in
ReloadingWicketFilter, if needed.
NOTE: as Johan Compagner mentioned, the second level cache and the
http sessions are not (yet) invalidated upon class reloading, so
in other words if you get weird behaviour, better restart the
server.
WARNING: this feature is not compatible with Spring yet. In the
near future I intend to provide means to include and/or exclude
specific class name patterns, in order to only load the Wicket
components through the reloading classloader.
FWIW I also maintain a similar patch for Wicket 1.2.3.
Cheers,
--
Jean-Baptiste Quenot
aka John Banana Qwerty
http://caraldi.com/jbq/