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 Ceki Gülcü <ce...@qos.ch> on 2005/01/11 22:18:40 UTC

Testing web-application recycling?

Hello,

Can Cactus be used to test the correct recycling of Web applications?


-- 
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/



RE: Testing web-application recycling?

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

> -----Original Message-----
> From: Ceki Gülcü [mailto:ceki@qos.ch]
> Sent: jeudi 13 janvier 2005 14:12
> To: Cactus Users List
> Subject: RE: Testing web-application recycling?
> 
> Hi Vincent,
> 
> Sorry, I was not very clear. By recycling, I meant the "redeployment"
> of the whole web-application. This happens when a web application
> which has been deployed from a WAR
> 
> - has its WAR file updated: the expanded web application is removed,
>    and the WAR is expanded again.
> 
> - has its /WEB-INF/web.xml file updated.
> 
> - when the reload command is issued for the web application
> 
> For more details see for example: http://tinyurl.com/5mln2
> 
> Any serious web-application needs to make sure that when redeployed
> resources are recycled properly, e.g. files released, db connections
> closed, etc. This redeployment problem is also closely related to
> hot deployment as well as clustering and session replication.
> 
> Given the tight coupling with the App Server, redeployment tests
> require in-container testing.

I don't know. I guess it depends how you wish to check that the redeployment
has worked. It seems to me it should be easier to do the check at the
functional level (i.e. from the outside of the application). For example,
for a web application you could call a URL, verify it works, then do some
hot deployment with a newer version that changes the behavior of this
method, call that URL again and verify that the new result is the expected
one.

Do you have a specific use case in mind on which we could work and see
whether functional or unit level testing would be easier to achieve?

In any case, if you find that you can test the hot deployment change at the
unit level then Cactus will be able to do it. However you'll need to do the
hot redeployment by hand as the Cactus front end tools (Ant task, Maven
plugin, Web Test Runner) do not currently support doing a hot redeploy (and
we have started implementing this in Cargo but it's not ready yet).

[snip]

Thanks
-Vincent



RE: Testing web-application recycling?

Posted by Ceki Gülcü <ce...@qos.ch>.
Hi Vincent,

Sorry, I was not very clear. By recycling, I meant the "redeployment"
of the whole web-application. This happens when a web application
which has been deployed from a WAR

- has its WAR file updated: the expanded web application is removed,
   and the WAR is expanded again.

- has its /WEB-INF/web.xml file updated.

- when the reload command is issued for the web application

For more details see for example: http://tinyurl.com/5mln2

Any serious web-application needs to make sure that when redeployed
resources are recycled properly, e.g. files released, db connections
closed, etc. This redeployment problem is also closely related to
hot deployment as well as clustering and session replication.

Given the tight coupling with the App Server, redeployment tests
require in-container testing.


At 05:56 AM 1/13/2005, Vincent Massol wrote:
>Hi Ceki,
>
>I am not sure what you mean by "recycling" but you could certainly call the
>destroy() method of your Servlet and then call again the init() method, and
>then check that your business methods are still working (or something
>similar - I don't remember by heart the lifecycle of a servlet). The same
>would apply to JSP/Taglibs/Filters. I have never done that though.
>
>Is that what you meant?
>
>Thanks
>-Vincent
>
> > -----Original Message-----
> > From: Ceki Gülcü [mailto:ceki@qos.ch]
> > Sent: mardi 11 janvier 2005 22:19
> > To: cactus-user@jakarta.apache.org
> > Subject: Testing web-application recycling?
> >
> >
> > Hello,
> >
> > Can Cactus be used to test the correct recycling of Web applications?
> >
> >
> > --
> > Ceki Gülcü
> >
> >    The complete log4j manual: http://www.qos.ch/log4j/
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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

-- 
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/



RE: Testing web-application recycling?

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

I am not sure what you mean by "recycling" but you could certainly call the
destroy() method of your Servlet and then call again the init() method, and
then check that your business methods are still working (or something
similar - I don't remember by heart the lifecycle of a servlet). The same
would apply to JSP/Taglibs/Filters. I have never done that though.

Is that what you meant?

Thanks
-Vincent

> -----Original Message-----
> From: Ceki Gülcü [mailto:ceki@qos.ch]
> Sent: mardi 11 janvier 2005 22:19
> To: cactus-user@jakarta.apache.org
> Subject: Testing web-application recycling?
> 
> 
> Hello,
> 
> Can Cactus be used to test the correct recycling of Web applications?
> 
> 
> --
> Ceki Gülcü
> 
>    The complete log4j manual: http://www.qos.ch/log4j/
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org