You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Pills <pi...@hmcrecord.ch> on 2007/12/19 17:21:29 UTC

[AuthenticatedWebSession] Constructor called twice

Hi everybody,

I found something a bit strange. I put a "System.out.println("here")" on my
AuthenticatedWebSession's constructor, and it seems to be called twice for
each new user...

Is it a normal behavior? Why is it called twice?

Thanks


PS: I never call "new MySession" myself, this is done by wicket
-- 
View this message in context: http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp14420125p14420125.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [AuthenticatedWebSession] Constructor called twice

Posted by Igor Vaynberg <ig...@gmail.com>.
you can generate the stack traces....

-igor


On Dec 19, 2007 1:45 PM, Pills <pi...@hmcrecord.ch> wrote:
>
>
> igor.vaynberg wrote:
> >
> > can you show us the two stack traces?
> >
> > -igor
> >
>
> There is no really stack trace. I have this output in my console when I
> launch it from eclipse.
>
> <code>
> 19 déc. 2007 22:22:57 org.apache.catalina.core.AprLifecycleListener init
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path: C:\Program
> Files\MyEclipse 6.0\bin;C:\Program Files\MyEclipse
> 6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin
> 19 déc. 2007 22:22:57 org.apache.coyote.http11.Http11Protocol init
> INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
> 19 déc. 2007 22:22:57 org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 1315 ms
> 19 déc. 2007 22:22:57 org.apache.catalina.core.StandardService start
> INFO: Démarrage du service Catalina
> 19 déc. 2007 22:22:57 org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
> ********************************************************************
> *** WARNING: Wicket is running in DEVELOPMENT mode.              ***
> ***                               ^^^^^^^^^^^                    ***
> *** Do NOT deploy to your live server(s) without changing this.  ***
> *** See Application#getConfigurationType() for more information. ***
> ********************************************************************
> 19 déc. 2007 22:23:07 org.apache.coyote.http11.Http11Protocol start
> INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
> 19 déc. 2007 22:23:07 org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> 19 déc. 2007 22:23:07 org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/140  config=null
> 19 déc. 2007 22:23:07 org.apache.catalina.startup.Catalina start
> INFO: Server startup in 10228 ms
> session constructor
> session constructor
> </code>
>
> The two last lines are writed by the session's constructor, and both from by
> the connection of one user.
>
> Basically, my code is very simple (my authenticated web application returns
> my authenticated web session's class in its getWebSessionClass() method, and
> there is nothing speical in the constructor)
>
> After that, each connection calls this constructor only one time
> --
> View this message in context: http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp14420125p14425981.html
>
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: [AuthenticatedWebSession] Constructor called twice

Posted by Dan Kaplan <dk...@citizenhawk.com>.
I see you're using eclipse.  I'm using IDEA.  I noticed with IDEA that when
it opened the home page for me, it always hit the home page twice.  Maybe
Eclipse uses the same call and that's why you're seeing what you're seeing.
If your IDE is the one that's starting up the homepage, you should try doing
it by hand and see if 2 sessions are created.

-----Original Message-----
From: Pills [mailto:pills@hmcrecord.ch] 
Sent: Wednesday, December 19, 2007 1:45 PM
To: users@wicket.apache.org
Subject: Re: [AuthenticatedWebSession] Constructor called twice



igor.vaynberg wrote:
> 
> can you show us the two stack traces?
> 
> -igor
> 

There is no really stack trace. I have this output in my console when I
launch it from eclipse.

<code>
19 déc. 2007 22:22:57 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program
Files\MyEclipse 6.0\bin;C:\Program Files\MyEclipse
6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.
0.1.zmyeclipse601200710\tomcat\bin
19 déc. 2007 22:22:57 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
19 déc. 2007 22:22:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1315 ms
19 déc. 2007 22:22:57 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
19 déc. 2007 22:22:57 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
19 déc. 2007 22:23:07 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
19 déc. 2007 22:23:07 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
19 déc. 2007 22:23:07 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/140  config=null
19 déc. 2007 22:23:07 org.apache.catalina.startup.Catalina start
INFO: Server startup in 10228 ms
session constructor
session constructor
</code>

The two last lines are writed by the session's constructor, and both from by
the connection of one user.

Basically, my code is very simple (my authenticated web application returns
my authenticated web session's class in its getWebSessionClass() method, and
there is nothing speical in the constructor)

After that, each connection calls this constructor only one time 
-- 
View this message in context:
http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp1
4420125p14425981.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [AuthenticatedWebSession] Constructor called twice

Posted by Pills <pi...@hmcrecord.ch>.

igor.vaynberg wrote:
> 
> can you show us the two stack traces?
> 
> -igor
> 

There is no really stack trace. I have this output in my console when I
launch it from eclipse.

<code>
19 déc. 2007 22:22:57 org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in
production environments was not found on the java.library.path: C:\Program
Files\MyEclipse 6.0\bin;C:\Program Files\MyEclipse
6.0\myeclipse\eclipse\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_6.0.1.zmyeclipse601200710\tomcat\bin
19 déc. 2007 22:22:57 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
19 déc. 2007 22:22:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1315 ms
19 déc. 2007 22:22:57 org.apache.catalina.core.StandardService start
INFO: Démarrage du service Catalina
19 déc. 2007 22:22:57 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
********************************************************************
*** WARNING: Wicket is running in DEVELOPMENT mode.              ***
***                               ^^^^^^^^^^^                    ***
*** Do NOT deploy to your live server(s) without changing this.  ***
*** See Application#getConfigurationType() for more information. ***
********************************************************************
19 déc. 2007 22:23:07 org.apache.coyote.http11.Http11Protocol start
INFO: Démarrage de Coyote HTTP/1.1 sur http-8080
19 déc. 2007 22:23:07 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
19 déc. 2007 22:23:07 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/140  config=null
19 déc. 2007 22:23:07 org.apache.catalina.startup.Catalina start
INFO: Server startup in 10228 ms
session constructor
session constructor
</code>

The two last lines are writed by the session's constructor, and both from by
the connection of one user.

Basically, my code is very simple (my authenticated web application returns
my authenticated web session's class in its getWebSessionClass() method, and
there is nothing speical in the constructor)

After that, each connection calls this constructor only one time 
-- 
View this message in context: http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp14420125p14425981.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: [AuthenticatedWebSession] Constructor called twice

Posted by Igor Vaynberg <ig...@gmail.com>.
can you show us the two stack traces?

-igor


On Dec 19, 2007 8:21 AM, Pills <pi...@hmcrecord.ch> wrote:
>
> Hi everybody,
>
> I found something a bit strange. I put a "System.out.println("here")" on my
> AuthenticatedWebSession's constructor, and it seems to be called twice for
> each new user...
>
> Is it a normal behavior? Why is it called twice?
>
> Thanks
>
>
> PS: I never call "new MySession" myself, this is done by wicket
> --
> View this message in context: http://www.nabble.com/-AuthenticatedWebSession--Constructor-called-twice-tp14420125p14420125.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org