[ 
https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kenny MacLeod updated WICKET-2572:
----------------------------------

    Attachment: SpringWebApplicationFactory.patch
                SpringWebApplicationFactory.java

See attached, modified version of SpringWebApplicationFactory, plus patch.

What I haven't figured out how to do is the teardown of the created context. 
The SpringWebApplicationFactory has no control over the filter lifecycle, and 
thus has no opportunity to shutdown the context cleanly.

Is there a way to either register the context as a "disposable" object in the 
WebApplication, to be disposed by internalDestroy()? Alternatively, perhaps the 
filter needs to inform the WebApplicationFactory that the application is being 
shut down?

> Add capability for SpringWebApplicationFactory to create its own application 
> context
> ------------------------------------------------------------------------------------
>
>                 Key: WICKET-2572
>                 URL: https://issues.apache.org/jira/browse/WICKET-2572
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-spring
>    Affects Versions: 1.4.3, 1.5-M1
>            Reporter: Kenny MacLeod
>         Attachments: SpringWebApplicationFactory.java, 
> SpringWebApplicationFactory.patch
>
>
> The current SpringWebApplicationFactory is only capable of using the root 
> WebApplicationContext to fetch the WebApplication object. In cases where 
> there's only one Wicket application per webapp, this is fine, but sometimes 
> you want more than one, and you want them in seperate contexts.  
> This is analogous to using multiple Spring DispatcherServlets in a single 
> webapp - each servlet gets its own context, and optionally share the same 
> root WebApplicationContext as their parent.
> I propose an enhancement to SpringWebApplicationFactory allowing it to create 
> a new application context, and to retrieve the WebApplication object from 
> there.
> Patch to follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to