[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-3621) Support hot-deployment of instrumented wicket components

Clint Popetz (JIRA) jira-events at lists.jboss.org
Mon Oct 27 12:13:20 EDT 2008


     [ https://jira.jboss.org/jira/browse/JBSEAM-3621?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clint Popetz updated JBSEAM-3621:
---------------------------------

    Attachment: seam-hot-deploy-wicket2.diff


This second patch makes use of the existing postInit and postRe-init events from the WicketFilter to save a local reference to the HotDeploymentStrategy's classloader, as the HotDeploymentStrategy is in the event context at that time.  It sets it as the ContextClassLoader for the duration of the initialization of the underlying wicketFIlterInstantiator.

This results in a simpler patch, with no long term storage of the HotDeploymentStrategy, and no outside-accessible storage of the classloader itself.  I would rather that WicketFIlterInstantiator itself could listen to the events and grab the classloader, but it's stateless (and has to remain stateless for WicketFilter to be able to grab an instance of it in order to know whether to set up contexts, a catch-22.)

> 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
>
>
> 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: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list