jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ASchu...@maninvestments.com>
Subject RE: Session Limit Exceeded
Date Thu, 17 Feb 2005 16:31:45 GMT
Hi Vincent,

Maybe you can help if I will give you more information.

I still try to invalidate the second session. I think it should be possible to invalidate
it from the client-side
to use the HttpConnection isn't it ? Because the Client expected the result and after it should
be ok to invalidate the session in the end() method. I tried HTTPConnection.getInputstream().close();
or HTTPConnection.disconnect() without success.
 
Cactus especially the HTTPClient was not able to handle the cookies from the ATG Dynamo 6.4
AppServer.
My workaround was to add the TestRunner and RedirectorServlet to an exceptionPath. Means then
Cookies were not set
and the cactustest was running fine. The missing cookie is the reason that 2 session are created
per testcase although the WebRequest.setAutomaticSession(false) is set.
I had same problems by writing a HTTPUnit test with Cookies.

Cheers,
Andre

 

-----Original Message-----
From: Vincent Massol [mailto:vmassol@pivolis.com] 
Sent: 17 February 2005 13:55
To: cactus-user@jakarta.apache.org
Subject: RE: Session Limit Exceeded




> -----Original Message-----
> From: ASchulte@maninvestments.com [mailto:ASchulte@maninvestments.com]
> Sent: jeudi 17 février 2005 14:53
> To: cactus-user@jakarta.apache.org
> Cc: vmassol@pivolis.com
> Subject: RE: Session Limit Exceeded
> 
> The testcase creates 2 sessions.
> I can only invalidate 1 session at the moment.
> Is it possible to invalidate the second session as well in the 
> tearDown method or somewhere else ?

No idea. Cactus client makes 2 calls to the server side: one for executing the test and one
for getting the results. But it shouldn't create any session (or if it does I have no idea
where in the code).

Thanks
-Vincent

> 
> Cheers,
> Andre
> 
> -----Original Message-----
> From: Vincent Massol [mailto:vmassol@pivolis.com]
> Sent: 17 February 2005 13:28
> To: cactus-user@jakarta.apache.org
> Subject: RE: Session Limit Exceeded
> 
> 
> 
> 
> > -----Original Message-----
> > From: ASchulte@maninvestments.com 
> > [mailto:ASchulte@maninvestments.com]
> > Sent: jeudi 17 février 2005 14:25
> > To: cactus-user@jakarta.apache.org
> > Cc: vmassol@pivolis.com
> > Subject: RE: Session Limit Exceeded
> >
> > Thank's Vincent, but the same behaviour in the tearDown() method. 
> > The session is null. Is it a wrong way to access the session object 
> > ?
> >
> > public void tearDown()
> > {
> >     this.session.invalidate()
> > }
> 
> No, it's correct. It simply means that there is no session!!! Which is 
> normal is you've set setAutomaticSession(false) :-) That proves it 
> works...
> 
> Try setting setAutomaticSession(true). You should have something not 
> null.
> 
> -Vincent
> 
> >
> >
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@pivolis.com]
> > Sent: 17 February 2005 13:08
> > To: 'Cactus Users List'
> > Subject: RE: Session Limit Exceeded
> >
> >
> >
> >
> > > -----Original Message-----
> > > From: ASchulte@maninvestments.com 
> > > [mailto:ASchulte@maninvestments.com]
> > > Sent: jeudi 17 février 2005 14:04
> > > To: cactus-user@jakarta.apache.org
> > > Cc: vmassol@pivolis.com
> > > Subject: RE: Session Limit Exceeded
> > >
> > > Hi Vincent,
> > >
> > > thanks for your suggestions.
> > > The reason that the invalidate failed is that the session is null 
> > > in the method end. I think the session should be not null at this 
> > > point, isn't it ?
> >
> > No, that's correct. You need to understand that beginXXX/endXXX are 
> > executed on the *client* side whereas setUp()/tearDown() are 
> > executed on the *server* side. Please see 
> > http://jakarta.apache.org/cactus/writing/howto_testcase.html
> >
> > So you'll need to put the invalidate in a tearDown() method.
> >
> > >
> > >
> > > CactusTestCase
> > >
> > > public void end(HttpURLConnection theConnection)
> > > {
> > >    this.session.invalidate()
> > > }
> > >
> >
> > [snip]
> >
> > -Vincent
> >
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> >
> >
> >
> > ********************************************************************
> > **
> > Any information in this communication which is confidential must not
> > be disclosed to others without our consent. Such consent is not
> > required where the information is publicly available and intended for
> > onward distribution. If the information is confidential and if you are
> > not the intended recipient, you are not authorised to and must not
> > disclose, copy, distribute, or retain this message or any part of it.
> > You are requested to return this message to the sender immediately.
> >
> > Due to the electronic nature of e-mail, there is a risk that the 
> > information contained in this message has been modified. 
> > Consequently Man Investments can accept no responsibility or 
> > liability as to the completeness or accuracy of the information.
> >
> > Visit us at: www.maninvestments.com
> >
> > ********************************************************************
> > **
> 
> 
> _________________________________________________________________
> 
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> 
> Yahoo! Mail : http://fr.mail.yahoo.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org


_________________________________________________________________

Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !

Yahoo! Mail : http://fr.mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org


Mime
View raw message