You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kenny MacLeod (JIRA)" <ji...@apache.org> on 2009/11/11 11:30:39 UTC

[jira] Created: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

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


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.


[jira] Updated: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Kenny MacLeod (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Commented: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777032#action_12777032 ] 

Igor Vaynberg commented on WICKET-2572:
---------------------------------------

yeah, missed that, my bad

> 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
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.4, 1.5-M1
>
>         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.
> The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.
> Patch to follow.

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


[jira] Reopened: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Kenny MacLeod (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kenny MacLeod reopened WICKET-2572:
-----------------------------------


The patch as submitted is not complete, we still need a way of shutting down the context when the WicketFilter shuts down. There doesn't appear to be a current mechanism for that.

> 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
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.4, 1.5-M1
>
>         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.
> The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.
> Patch to follow.

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


[jira] Resolved: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2572.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M1
                   1.4.4
         Assignee: Igor Vaynberg

> 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
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.4, 1.5-M1
>
>         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.
> The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.
> Patch to follow.

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


[jira] Resolved: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg resolved WICKET-2572.
-----------------------------------

    Resolution: Fixed

> 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
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.4, 1.5-M1
>
>         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.
> The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.
> Patch to follow.

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


[jira] Updated: (WICKET-2572) Add capability for SpringWebApplicationFactory to create its own application context

Posted by "Kenny MacLeod (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Description: 
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.

The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.

Patch to follow.

  was:
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.


> 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.
> The WebApplication object itself can then have itself autowired with the application context from which it was fetched. This application context can then be fed into SpringComponentInjector's constructor, so there's no need for SpringComponentInjector to know how to look up this newly-created context.
> Patch to follow.

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