You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by sp <br...@gmail.com> on 2007/12/21 10:13:38 UTC

WebApplication's newSession()

Hello,

I'm new to Wicket and to Java in general.

I'm trying to configure a Swarm+Acegi-driven security for my application.
Since I need more Spring in future, MyWebApplication extends
SpringWebApplication and implements WaspApplication.

To make things work, I have to use WaspSession instead of regular Session,
but when I try to override newSession() method in MyWebApplication, my IDE
says this method is declared final in WebApplication class.

This is 1.3-RC2 version of Wicket, Swarm & Wasp are second betas.

I assume I have to use my own SessionFactory somehow to put WaspSession in
use. I just thought that the introduction of newSession() method was
something done in 1.3 specifically to avoid using of SessioFactory just to
use cusom Session.

Please, tell me if I'm missing something here.

Thanks.

-- 
sp

Re: WebApplication's newSession()

Posted by sp <br...@gmail.com>.
On 21/12/2007, Martijn Dashorst <ma...@gmail.com> wrote:

There is no need to extend the SpringWebApplication anymore:
>
> addComponentInstantiationListener(new SpringComponentInjector(this));
>
> You can read more here: http://cwiki.apache.org/WICKET/spring.html
>
>
Thanks for the tip, but I don't think I can use this

I'm tied to JDK1.4 which I assume doesn't support annotations of this kind.
So I have to stick to SpringWebApplication-based approach.

-- 
sp

Re: WebApplication's newSession()

Posted by Martijn Dashorst <ma...@gmail.com>.
There is no need to extend the SpringWebApplication anymore:

class MyApplication extends WebApplication {
    public void init() {
        super.init();
        addComponentInstantiationListener(new SpringComponentInjector(this));
    }
}


You can read more here: http://cwiki.apache.org/WICKET/spring.html

Martijn

On Dec 21, 2007 10:13 AM, sp <br...@gmail.com> wrote:

> Hello,
>
> I'm new to Wicket and to Java in general.
>
> I'm trying to configure a Swarm+Acegi-driven security for my application.
> Since I need more Spring in future, MyWebApplication extends
> SpringWebApplication and implements WaspApplication.
>
> To make things work, I have to use WaspSession instead of regular Session,
> but when I try to override newSession() method in MyWebApplication, my IDE
> says this method is declared final in WebApplication class.
>
> This is 1.3-RC2 version of Wicket, Swarm & Wasp are second betas.
>
> I assume I have to use my own SessionFactory somehow to put WaspSession in
> use. I just thought that the introduction of newSession() method was
> something done in 1.3 specifically to avoid using of SessioFactory just to
> use cusom Session.
>
> Please, tell me if I'm missing something here.
>
> Thanks.
>
> --
> sp
>



-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc2 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/