You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by jacques <in...@yahoo.com> on 2003/08/25 16:05:44 UTC

question wrt session creation when running cactus from ant

Hi there

I am having problems with the amount of http sessions
that are created when cactus is invoked from ant. It
looks like for each test run ant (using the <cactus>
task) call the web server once, to check that it's
running. Something like :

/cactification/ServletRedirector?Cactus_Service=RUN_TEST
HTTP/1.1

Then, for each test method, 2 seperate http calls are
made. One to request the servlet redirector to execute
the test, and one to request the result. Something
like : 

/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHeader&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_AutomaticSession=false&Cactus_Service=CALL_TEST
HTTP/1.1
     and...
     
/cactification/ServletRedirector?Cactus_Service=GET_RESULTS
HTTP/1.1

These 2 calls (and thus request objects) cause 2 http
sessions to be created on the application server. Of
the 2, I have access to one (the one that makes the
test call) and can invalidate it in the tearDown. That
leaves me with 1 redundant session (the one associated
with the result request). One session on the app
server for each test method run. I have 276 test
methods that I need to run, and only a 20 session
developer license. My problem (and therefore my
question) is quite obvious : How can I get access to
the request that's made in the second call, so that I
can call getSession(false).invalidate() on it ?

Jacques






__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

RE: question wrt session creation when running cactus from ant

Posted by jacques <in...@yahoo.com>.
Hi Vincent

Pls see my other reply to this. In addition, I would
like to know whether it would be possible to include
this change in Cactus. If not, are there anything else
you could recommend ? 

Regards
Jacques

--- Vincent Massol <vm...@pivolis.com> wrote:
> Hi Jacques,
> 
> See my other mail. Are you sure there are 3 sessions
> per test created?
> I'd say there is one at most. Calling the server
> side does not
> automatically result in a session, you need to call
> getSession(true) to
> create a session, right?
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: jacques [mailto:inspired_orange@yahoo.com]
> > Sent: 25 August 2003 16:06
> > To: cactus-user@jakarta.apache.org
> > Subject: question wrt session creation when
> running cactus from ant
> > 
> > Hi there
> > 
> > I am having problems with the amount of http
> sessions
> > that are created when cactus is invoked from ant.
> It
> > looks like for each test run ant (using the
> <cactus>
> > task) call the web server once, to check that it's
> > running. Something like :
> > 
> >
>
/cactification/ServletRedirector?Cactus_Service=RUN_TEST
> > HTTP/1.1
> > 
> > Then, for each test method, 2 seperate http calls
> are
> > made. One to request the servlet redirector to
> execute
> > the test, and one to request the result. Something
> > like :
> > 
> >
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
> de
> >
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
> Au
> > tomaticSession=false&Cactus_Service=CALL_TEST
> > HTTP/1.1
> >      and...
> > 
> >
>
/cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> > HTTP/1.1
> > 
> > These 2 calls (and thus request objects) cause 2
> http
> > sessions to be created on the application server.
> Of
> > the 2, I have access to one (the one that makes
> the
> > test call) and can invalidate it in the tearDown.
> That
> > leaves me with 1 redundant session (the one
> associated
> > with the result request). One session on the app
> > server for each test method run. I have 276 test
> > methods that I need to run, and only a 20 session
> > developer license. My problem (and therefore my
> > question) is quite obvious : How can I get access
> to
> > the request that's made in the second call, so
> that I
> > can call getSession(false).invalidate() on it ?
> > 
> > Jacques
> > 
> > 
> > 
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

Re: question wrt session creation when running cactus from ant

Posted by inspired_orange <in...@yahoo.com>.
Hi Vincent / Christopher

Of course, the change is very minor and doesn't make
any sense at a first glance. I can see why somebody
would want to change it. I have added an additional
comment to the bugzilla report (id #23017) which
contains a proposed comment for the code.

I guess it all boils down to wether you guys decide to
include this change or not. If there's anything else I
can do to convince you, pls. shout. ;-)

Jacques

--- Christopher Lenz <cm...@gmx.de> wrote:
> Vincent Massol wrote:
> > 
> >>-----Original Message-----
> >>From: inspired_orange
> [mailto:inspired_orange@yahoo.com]
> >>Sent: 22 September 2003 10:31
> >>To: Cactus Users List
> >>Subject: RE: question wrt session creation when
> running cactus from
> > 
> > ant
> > 
> >>Hi Vincent
> >>
> >>I have logged the enhancement in bugzilla (bug id
> >>23017). I was wondering... how long does this
> usually
> >>take ? I am only asking because I have logged it a
> few
> >>weeks ago, and maybe I need to do something else
> in
> >>order for this change to go in. Or not ?
> > 
> > hehe... :-) Usually it takes as long as someone
> post a patch for it and
> > a committer apply the patch. However, in your
> case, I think it needs to
> > be discussed with the other committers. I'm not
> yet 100% sure we should
> > do this.
> 
> IMHO applying the patch won't hurt, and if it helps
> ATG-Dynamo users, 
> why not. But the patch should add a comment that
> briefly explains the 
> situation (one sentence) - preferrably including the
> bug ID. Otherwise 
> some "smart guy" will revert the change in a couple
> of months ;-)
> 
> -chris
> 
> -- 
> Christopher Lenz
> /=/ cmlenz at gmx.de
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

Re: question wrt session creation when running cactus from ant

Posted by Christopher Lenz <cm...@gmx.de>.
Vincent Massol wrote:
> 
>>-----Original Message-----
>>From: inspired_orange [mailto:inspired_orange@yahoo.com]
>>Sent: 22 September 2003 10:31
>>To: Cactus Users List
>>Subject: RE: question wrt session creation when running cactus from
> 
> ant
> 
>>Hi Vincent
>>
>>I have logged the enhancement in bugzilla (bug id
>>23017). I was wondering... how long does this usually
>>take ? I am only asking because I have logged it a few
>>weeks ago, and maybe I need to do something else in
>>order for this change to go in. Or not ?
> 
> hehe... :-) Usually it takes as long as someone post a patch for it and
> a committer apply the patch. However, in your case, I think it needs to
> be discussed with the other committers. I'm not yet 100% sure we should
> do this.

IMHO applying the patch won't hurt, and if it helps ATG-Dynamo users, 
why not. But the patch should add a comment that briefly explains the 
situation (one sentence) - preferrably including the bug ID. Otherwise 
some "smart guy" will revert the change in a couple of months ;-)

-chris

-- 
Christopher Lenz
/=/ cmlenz at gmx.de


RE: v1.6dev or 1.5-beta1

Posted by Bret Kumler <bk...@firstam.com>.
I'm using the manual build.

-----Original Message-----
From: Bill Dudney [mailto:bdudney@mac.com]
Sent: Thursday, September 25, 2003 2:29 PM
To: Cactus Users List
Subject: Re: v1.6dev or 1.5-beta1


Thanks Bret,

Are you building from CVS our did you get the 9/9/07 manual build?

Thanks,

-bd-

On Thursday, September 25, 2003, at 09:15 AM, Bret Kumler wrote:

> I haven't had any problems with 1.6dev.
>
> -----Original Message-----
> From: Bill Dudney [mailto:bdudney@mac.com]
> Sent: Thursday, September 25, 2003 6:03 AM
> To: Cactus Users List
> Subject: v1.6dev or 1.5-beta1
>
>
> Hi All,
>
> I'm putting Cactus into a project and I was hoping to get a little
> advice. Is 1.6dev solid enough to use in everyday development or should
> i stick with v1.5-beta1?
>
> Thanks!
>
> -bd-
> http;//bill.dudney.net/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>


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




Re: v1.6dev or 1.5-beta1

Posted by Bill Dudney <bd...@mac.com>.
Thanks Bret,

Are you building from CVS our did you get the 9/9/07 manual build?

Thanks,

-bd-

On Thursday, September 25, 2003, at 09:15 AM, Bret Kumler wrote:

> I haven't had any problems with 1.6dev.
>
> -----Original Message-----
> From: Bill Dudney [mailto:bdudney@mac.com]
> Sent: Thursday, September 25, 2003 6:03 AM
> To: Cactus Users List
> Subject: v1.6dev or 1.5-beta1
>
>
> Hi All,
>
> I'm putting Cactus into a project and I was hoping to get a little
> advice. Is 1.6dev solid enough to use in everyday development or should
> i stick with v1.5-beta1?
>
> Thanks!
>
> -bd-
> http;//bill.dudney.net/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>


RE: v1.6dev or 1.5-beta1

Posted by Bret Kumler <bk...@firstam.com>.
I haven't had any problems with 1.6dev.

-----Original Message-----
From: Bill Dudney [mailto:bdudney@mac.com]
Sent: Thursday, September 25, 2003 6:03 AM
To: Cactus Users List
Subject: v1.6dev or 1.5-beta1


Hi All,

I'm putting Cactus into a project and I was hoping to get a little 
advice. Is 1.6dev solid enough to use in everyday development or should 
i stick with v1.5-beta1?

Thanks!

-bd-
http;//bill.dudney.net/


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




v1.6dev or 1.5-beta1

Posted by Bill Dudney <bd...@mac.com>.
Hi All,

I'm putting Cactus into a project and I was hoping to get a little 
advice. Is 1.6dev solid enough to use in everyday development or should 
i stick with v1.5-beta1?

Thanks!

-bd-
http;//bill.dudney.net/


RE: question wrt session creation when running cactus from ant

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: inspired_orange [mailto:inspired_orange@yahoo.com]
> Sent: 22 September 2003 10:31
> To: Cactus Users List
> Subject: RE: question wrt session creation when running cactus from
ant
> 
> Hi Vincent
> 
> I have logged the enhancement in bugzilla (bug id
> 23017). I was wondering... how long does this usually
> take ? I am only asking because I have logged it a few
> weeks ago, and maybe I need to do something else in
> order for this change to go in. Or not ?

hehe... :-) Usually it takes as long as someone post a patch for it and
a committer apply the patch. However, in your case, I think it needs to
be discussed with the other committers. I'm not yet 100% sure we should
do this.

Thanks
-Vincent

> 
> Jacques
> 
> --- Vincent Massol <vm...@pivolis.com> wrote:
> > Ok. I understand better now. I think we can
> > accommodate your change as
> > it seems to be harmless (I just wanted to check the
> > reason it was
> > needed). Can you please enter a bugzilla bug report
> > for that so that we
> > don't forget it?
> >
> > Thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: jacques [mailto:inspired_orange@yahoo.com]
> > > Sent: 08 September 2003 10:52
> > > To: Cactus Users List
> > > Subject: RE: question wrt session creation when
> > running cactus from
> > ant
> > >
> > > Hi Vincent
> > >
> > > Got busy for a while on other things, hence the
> > delay.
> > > Yes, I agree that calling the server does not
> > > automatically create a session - under normal
> > > circumstances. However, we are using an
> > application
> > > server (Atg Dynamo) which always creates a session
> > > object for every web request. Every http request
> > > passes through a servlet pipeline (a linked list
> > of
> > > servlets) before the implementation class is given
> > an
> > > opportunity to interact. By that time a session
> > has
> > > already been created. It is the default behaviour,
> > > which can be switched off, but I can unfortunately
> > not
> > > do that as the rest of the website depends on this
> > > behaviour.
> > >
> > > I guess it is not reasonable to expect Cactus to
> > > accomodate for every web server's own ways of
> > > interacting with clients. I just thought that the
> > > changes I proposed could do no harm (checking if a
> > > session has been created, and if so invalidating
> > it).
> > >
> > > Regards
> > > Jacques
> > >
> > >
> > > --- Vincent Massol <vm...@pivolis.com> wrote:
> > > > Hi Jacques,
> > > >
> > > > See my other mail. Are you sure there are 3
> > sessions
> > > > per test created?
> > > > I'd say there is one at most. Calling the server
> > > > side does not
> > > > automatically result in a session, you need to
> > call
> > > > getSession(true) to
> > > > create a session, right?
> > > >
> > > > Thanks
> > > > -Vincent
> > > >
> > > > > -----Original Message-----
> > > > > From: jacques
> > [mailto:inspired_orange@yahoo.com]
> > > > > Sent: 25 August 2003 16:06
> > > > > To: cactus-user@jakarta.apache.org
> > > > > Subject: question wrt session creation when
> > > > running cactus from ant
> > > > >
> > > > > Hi there
> > > > >
> > > > > I am having problems with the amount of http
> > > > sessions
> > > > > that are created when cactus is invoked from
> > ant.
> > > > It
> > > > > looks like for each test run ant (using the
> > > > <cactus>
> > > > > task) call the web server once, to check that
> > it's
> > > > > running. Something like :
> > > > >
> > > > >
> > > >
> > >
> >
> /cactification/ServletRedirector?Cactus_Service=RUN_TEST
> > > > > HTTP/1.1
> > > > >
> > > > > Then, for each test method, 2 seperate http
> > calls
> > > > are
> > > > > made. One to request the servlet redirector to
> > > > execute
> > > > > the test, and one to request the result.
> > Something
> > > > > like :
> > > > >
> > > > >
> > > >
> > >
> >
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
> > > > de
> > > > >
> > > >
> > >
> >
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
> > > > Au
> > > > > tomaticSession=false&Cactus_Service=CALL_TEST
> > > > > HTTP/1.1
> > > > >      and...
> > > > >
> > > > >
> > > >
> > >
> >
> /cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> > > > > HTTP/1.1
> > > > >
> > > > > These 2 calls (and thus request objects) cause
> > 2
> > > > http
> > > > > sessions to be created on the application
> > server.
> > > > Of
> > > > > the 2, I have access to one (the one that
> > makes
> > > > the
> > > > > test call) and can invalidate it in the
> > tearDown.
> > > > That
> > > > > leaves me with 1 redundant session (the one
> > > > associated
> > > > > with the result request). One session on the
> > app
> > > > > server for each test method run. I have 276
> > test
> > > > > methods that I need to run, and only a 20
> > session
> > > > > developer license. My problem (and therefore
> > my
> > > > > question) is quite obvious : How can I get
> > access
> > > > to
> > > > > the request that's made in the second call, so
> > > > that I
> > > > > can call getSession(false).invalidate() on it
> > ?
> > > > >
> > > > > Jacques
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > The New Yahoo! Search - Faster. Easier. Bingo.
> > > > > http://search.yahoo.com
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > cactus-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > cactus-user-help@jakarta.apache.org
> > > >
> > > >
> > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > cactus-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > > cactus-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > > http://sitebuilder.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > cactus-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > cactus-user-help@jakarta.apache.org
> >
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: question wrt session creation when running cactus from ant

Posted by inspired_orange <in...@yahoo.com>.
Hi Vincent

I have logged the enhancement in bugzilla (bug id
23017). I was wondering... how long does this usually
take ? I am only asking because I have logged it a few
weeks ago, and maybe I need to do something else in
order for this change to go in. Or not ?

Jacques

--- Vincent Massol <vm...@pivolis.com> wrote:
> Ok. I understand better now. I think we can
> accommodate your change as
> it seems to be harmless (I just wanted to check the
> reason it was
> needed). Can you please enter a bugzilla bug report
> for that so that we
> don't forget it?
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: jacques [mailto:inspired_orange@yahoo.com]
> > Sent: 08 September 2003 10:52
> > To: Cactus Users List
> > Subject: RE: question wrt session creation when
> running cactus from
> ant
> > 
> > Hi Vincent
> > 
> > Got busy for a while on other things, hence the
> delay.
> > Yes, I agree that calling the server does not
> > automatically create a session - under normal
> > circumstances. However, we are using an
> application
> > server (Atg Dynamo) which always creates a session
> > object for every web request. Every http request
> > passes through a servlet pipeline (a linked list
> of
> > servlets) before the implementation class is given
> an
> > opportunity to interact. By that time a session
> has
> > already been created. It is the default behaviour,
> > which can be switched off, but I can unfortunately
> not
> > do that as the rest of the website depends on this
> > behaviour.
> > 
> > I guess it is not reasonable to expect Cactus to
> > accomodate for every web server's own ways of
> > interacting with clients. I just thought that the
> > changes I proposed could do no harm (checking if a
> > session has been created, and if so invalidating
> it).
> > 
> > Regards
> > Jacques
> > 
> > 
> > --- Vincent Massol <vm...@pivolis.com> wrote:
> > > Hi Jacques,
> > >
> > > See my other mail. Are you sure there are 3
> sessions
> > > per test created?
> > > I'd say there is one at most. Calling the server
> > > side does not
> > > automatically result in a session, you need to
> call
> > > getSession(true) to
> > > create a session, right?
> > >
> > > Thanks
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: jacques
> [mailto:inspired_orange@yahoo.com]
> > > > Sent: 25 August 2003 16:06
> > > > To: cactus-user@jakarta.apache.org
> > > > Subject: question wrt session creation when
> > > running cactus from ant
> > > >
> > > > Hi there
> > > >
> > > > I am having problems with the amount of http
> > > sessions
> > > > that are created when cactus is invoked from
> ant.
> > > It
> > > > looks like for each test run ant (using the
> > > <cactus>
> > > > task) call the web server once, to check that
> it's
> > > > running. Something like :
> > > >
> > > >
> > >
> >
>
/cactification/ServletRedirector?Cactus_Service=RUN_TEST
> > > > HTTP/1.1
> > > >
> > > > Then, for each test method, 2 seperate http
> calls
> > > are
> > > > made. One to request the servlet redirector to
> > > execute
> > > > the test, and one to request the result.
> Something
> > > > like :
> > > >
> > > >
> > >
> >
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
> > > de
> > > >
> > >
> >
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
> > > Au
> > > > tomaticSession=false&Cactus_Service=CALL_TEST
> > > > HTTP/1.1
> > > >      and...
> > > >
> > > >
> > >
> >
>
/cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> > > > HTTP/1.1
> > > >
> > > > These 2 calls (and thus request objects) cause
> 2
> > > http
> > > > sessions to be created on the application
> server.
> > > Of
> > > > the 2, I have access to one (the one that
> makes
> > > the
> > > > test call) and can invalidate it in the
> tearDown.
> > > That
> > > > leaves me with 1 redundant session (the one
> > > associated
> > > > with the result request). One session on the
> app
> > > > server for each test method run. I have 276
> test
> > > > methods that I need to run, and only a 20
> session
> > > > developer license. My problem (and therefore
> my
> > > > question) is quite obvious : How can I get
> access
> > > to
> > > > the request that's made in the second call, so
> > > that I
> > > > can call getSession(false).invalidate() on it
> ?
> > > >
> > > > Jacques
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > The New Yahoo! Search - Faster. Easier. Bingo.
> > > > http://search.yahoo.com
> > > >
> > > >
> > >
> >
>
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > cactus-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > cactus-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > cactus-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > cactus-user-help@jakarta.apache.org
> > >
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> > http://sitebuilder.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

RE: question wrt session creation when running cactus from ant

Posted by Vincent Massol <vm...@pivolis.com>.
Ok. I understand better now. I think we can accommodate your change as
it seems to be harmless (I just wanted to check the reason it was
needed). Can you please enter a bugzilla bug report for that so that we
don't forget it?

Thanks
-Vincent

> -----Original Message-----
> From: jacques [mailto:inspired_orange@yahoo.com]
> Sent: 08 September 2003 10:52
> To: Cactus Users List
> Subject: RE: question wrt session creation when running cactus from
ant
> 
> Hi Vincent
> 
> Got busy for a while on other things, hence the delay.
> Yes, I agree that calling the server does not
> automatically create a session - under normal
> circumstances. However, we are using an application
> server (Atg Dynamo) which always creates a session
> object for every web request. Every http request
> passes through a servlet pipeline (a linked list of
> servlets) before the implementation class is given an
> opportunity to interact. By that time a session has
> already been created. It is the default behaviour,
> which can be switched off, but I can unfortunately not
> do that as the rest of the website depends on this
> behaviour.
> 
> I guess it is not reasonable to expect Cactus to
> accomodate for every web server's own ways of
> interacting with clients. I just thought that the
> changes I proposed could do no harm (checking if a
> session has been created, and if so invalidating it).
> 
> Regards
> Jacques
> 
> 
> --- Vincent Massol <vm...@pivolis.com> wrote:
> > Hi Jacques,
> >
> > See my other mail. Are you sure there are 3 sessions
> > per test created?
> > I'd say there is one at most. Calling the server
> > side does not
> > automatically result in a session, you need to call
> > getSession(true) to
> > create a session, right?
> >
> > Thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: jacques [mailto:inspired_orange@yahoo.com]
> > > Sent: 25 August 2003 16:06
> > > To: cactus-user@jakarta.apache.org
> > > Subject: question wrt session creation when
> > running cactus from ant
> > >
> > > Hi there
> > >
> > > I am having problems with the amount of http
> > sessions
> > > that are created when cactus is invoked from ant.
> > It
> > > looks like for each test run ant (using the
> > <cactus>
> > > task) call the web server once, to check that it's
> > > running. Something like :
> > >
> > >
> >
> /cactification/ServletRedirector?Cactus_Service=RUN_TEST
> > > HTTP/1.1
> > >
> > > Then, for each test method, 2 seperate http calls
> > are
> > > made. One to request the servlet redirector to
> > execute
> > > the test, and one to request the result. Something
> > > like :
> > >
> > >
> >
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
> > de
> > >
> >
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
> > Au
> > > tomaticSession=false&Cactus_Service=CALL_TEST
> > > HTTP/1.1
> > >      and...
> > >
> > >
> >
> /cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> > > HTTP/1.1
> > >
> > > These 2 calls (and thus request objects) cause 2
> > http
> > > sessions to be created on the application server.
> > Of
> > > the 2, I have access to one (the one that makes
> > the
> > > test call) and can invalidate it in the tearDown.
> > That
> > > leaves me with 1 redundant session (the one
> > associated
> > > with the result request). One session on the app
> > > server for each test method run. I have 276 test
> > > methods that I need to run, and only a 20 session
> > > developer license. My problem (and therefore my
> > > question) is quite obvious : How can I get access
> > to
> > > the request that's made in the second call, so
> > that I
> > > can call getSession(false).invalidate() on it ?
> > >
> > > Jacques
> > >
> > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > The New Yahoo! Search - Faster. Easier. Bingo.
> > > http://search.yahoo.com
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > cactus-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > cactus-user-help@jakarta.apache.org
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > cactus-user-help@jakarta.apache.org
> >
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



RE: question wrt session creation when running cactus from ant

Posted by jacques <in...@yahoo.com>.
Hi Vincent

Got busy for a while on other things, hence the delay.
Yes, I agree that calling the server does not
automatically create a session - under normal
circumstances. However, we are using an application
server (Atg Dynamo) which always creates a session
object for every web request. Every http request
passes through a servlet pipeline (a linked list of
servlets) before the implementation class is given an
opportunity to interact. By that time a session has
already been created. It is the default behaviour,
which can be switched off, but I can unfortunately not
do that as the rest of the website depends on this
behaviour.

I guess it is not reasonable to expect Cactus to
accomodate for every web server's own ways of
interacting with clients. I just thought that the
changes I proposed could do no harm (checking if a
session has been created, and if so invalidating it).

Regards
Jacques


--- Vincent Massol <vm...@pivolis.com> wrote:
> Hi Jacques,
> 
> See my other mail. Are you sure there are 3 sessions
> per test created?
> I'd say there is one at most. Calling the server
> side does not
> automatically result in a session, you need to call
> getSession(true) to
> create a session, right?
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: jacques [mailto:inspired_orange@yahoo.com]
> > Sent: 25 August 2003 16:06
> > To: cactus-user@jakarta.apache.org
> > Subject: question wrt session creation when
> running cactus from ant
> > 
> > Hi there
> > 
> > I am having problems with the amount of http
> sessions
> > that are created when cactus is invoked from ant.
> It
> > looks like for each test run ant (using the
> <cactus>
> > task) call the web server once, to check that it's
> > running. Something like :
> > 
> >
>
/cactification/ServletRedirector?Cactus_Service=RUN_TEST
> > HTTP/1.1
> > 
> > Then, for each test method, 2 seperate http calls
> are
> > made. One to request the servlet redirector to
> execute
> > the test, and one to request the result. Something
> > like :
> > 
> >
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
> de
> >
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
> Au
> > tomaticSession=false&Cactus_Service=CALL_TEST
> > HTTP/1.1
> >      and...
> > 
> >
>
/cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> > HTTP/1.1
> > 
> > These 2 calls (and thus request objects) cause 2
> http
> > sessions to be created on the application server.
> Of
> > the 2, I have access to one (the one that makes
> the
> > test call) and can invalidate it in the tearDown.
> That
> > leaves me with 1 redundant session (the one
> associated
> > with the result request). One session on the app
> > server for each test method run. I have 276 test
> > methods that I need to run, and only a 20 session
> > developer license. My problem (and therefore my
> > question) is quite obvious : How can I get access
> to
> > the request that's made in the second call, so
> that I
> > can call getSession(false).invalidate() on it ?
> > 
> > Jacques
> > 
> > 
> > 
> > 
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > The New Yahoo! Search - Faster. Easier. Bingo.
> > http://search.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> cactus-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

RE: question wrt session creation when running cactus from ant

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Jacques,

See my other mail. Are you sure there are 3 sessions per test created?
I'd say there is one at most. Calling the server side does not
automatically result in a session, you need to call getSession(true) to
create a session, right?

Thanks
-Vincent

> -----Original Message-----
> From: jacques [mailto:inspired_orange@yahoo.com]
> Sent: 25 August 2003 16:06
> To: cactus-user@jakarta.apache.org
> Subject: question wrt session creation when running cactus from ant
> 
> Hi there
> 
> I am having problems with the amount of http sessions
> that are created when cactus is invoked from ant. It
> looks like for each test run ant (using the <cactus>
> task) call the web server once, to check that it's
> running. Something like :
> 
> /cactification/ServletRedirector?Cactus_Service=RUN_TEST
> HTTP/1.1
> 
> Then, for each test method, 2 seperate http calls are
> made. One to request the servlet redirector to execute
> the test, and one to request the result. Something
> like :
> 
>
/cactification/ServletRedirector?Cactus_TestMethod=testSetContentTypeHea
de
>
r&Cactus_TestClass=org.apache.cactus.sample.unit.TestHttpHeaders&Cactus_
Au
> tomaticSession=false&Cactus_Service=CALL_TEST
> HTTP/1.1
>      and...
> 
> /cactification/ServletRedirector?Cactus_Service=GET_RESULTS
> HTTP/1.1
> 
> These 2 calls (and thus request objects) cause 2 http
> sessions to be created on the application server. Of
> the 2, I have access to one (the one that makes the
> test call) and can invalidate it in the tearDown. That
> leaves me with 1 redundant session (the one associated
> with the result request). One session on the app
> server for each test method run. I have 276 test
> methods that I need to run, and only a 20 session
> developer license. My problem (and therefore my
> question) is quite obvious : How can I get access to
> the request that's made in the second call, so that I
> can call getSession(false).invalidate() on it ?
> 
> Jacques
> 
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org