You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by swc <ma...@crissman.net> on 2005/01/12 22:31:12 UTC

Managing Internal Application Services

What is the proper method of performing the clean-up / shutdown 
procedures of java classes/applications that a web application contains 
internally?  I was thinking of bundling an in-memory database inside of 
my war file, and adding on servlet that started it up by calling it's 
init-on-startup method.  But it seems like this isn't a really good 
solution, and I don't have a way to shutdown the database when the 
web-app is shut down. 

Any advice on how to achieve this?

swc

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


Re: Managing Internal Application Services

Posted by swc <ma...@crissman.net>.
Ah, thank you, that was exactly what I was looking for! 

 The class name was enough to lead me to this, which could help anyone 
else with a similar issue:
http://e-docs.bea.com/wls/docs70/webapp/app_events.html

Regards,

swc


Paul Ferraro wrote:

> Use a javax.servlet.ServletContextListener.  Define it in your web.xml 
> and you're ready to go.
>
> Paul
>
> swc wrote:
>
>> What is the proper method of performing the clean-up / shutdown 
>> procedures of java classes/applications that a web application 
>> contains internally?  I was thinking of bundling an in-memory 
>> database inside of my war file, and adding on servlet that started it 
>> up by calling it's init-on-startup method.  But it seems like this 
>> isn't a really good solution, and I don't have a way to shutdown the 
>> database when the web-app is shut down.
>> Any advice on how to achieve this?
>>
>> swc
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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


Re: Managing Internal Application Services

Posted by Paul Ferraro <pm...@columbia.edu>.
Use a javax.servlet.ServletContextListener.  Define it in your web.xml 
and you're ready to go.

Paul

swc wrote:

> What is the proper method of performing the clean-up / shutdown 
> procedures of java classes/applications that a web application 
> contains internally?  I was thinking of bundling an in-memory database 
> inside of my war file, and adding on servlet that started it up by 
> calling it's init-on-startup method.  But it seems like this isn't a 
> really good solution, and I don't have a way to shutdown the database 
> when the web-app is shut down.
> Any advice on how to achieve this?
>
> swc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


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