]
Pete Muir updated JBSEAM-3621:
------------------------------
Attachment: WicketFilter.java.patch
Here is a formatted patch.
Support hot-deployment of instrumented wicket components
--------------------------------------------------------
Key: JBSEAM-3621
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3621
Project: Seam
Issue Type: Patch
Reporter: Clint Popetz
Assignee: Pete Muir
Fix For: 2.1.1.CR1
Attachments: seam-hot-deploy-wicket.diff, seam-hot-deploy-wicket2.diff,
WicketFilter.java.patch
Attached is a patch to add support for hot deployment of wicket components that have been
instrumented by the wicket instrumentation ant task from JBSEAM-3505. That patch should
be applied first to avoid conflicts.
The elements of this patch are:
* I need access to the HotDeploymentStrategy from the wicket classloader, but it's
currently only exposed in the event context for the duration of startup. I've changed
this to place it in the application context. I don't know if that's correct, but
it seemed like a reasonable place to store it. So HotDeploymentStrategy now does this in
its constructor.
* Initialization.redeploy now calls ServletLifecycle.beginReinitialization before
createHotDeployment so that the app context exists. This puts createHotDeployment in the
same contextual surroundings as its other invocation in Initialization.init().
* The WicketFilter needs to be re-initialized upon redeployment. So WicketFilter now
delays initialization of the delegate (the @Unwrapped anonymous subclass of wicket's
own WicketFilter) until the first actual request, and at each request it checks a stored
initTime against Init.getTimestamp(). If they've changed, it re-inits. Also, I place
WicketFilter within the HotDeployFilter via @Filter(within), so that all of this can work.
This survives the absence of the HotDeployFilter, i.e. if you deploy without
jboss-seam-debug.jar, SeamFilter ignores the missing within reference, and the
WicketClassLoader just uses the thread's contextClassLoader for the parent of the
instrumenting class loader.
* WicketClassLoader uses the HotDeploymentStrategy's classloader as the parent
classloader, if it exists. This means that runtime-instrumented wicket components can
reference hot-deployed wicket components, but not vice-versa, similar to how
hot-deployable seam components can reference normally deployed components, but not
vice-versa.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: