Bad. Wicket application start when you deploy it into Tomcat (it's time when WebApplication.init() is executed) and stop when you undeploy it or when you stop Tomcat - it should be very long time ;-)
My scenario is: In WebPage class i do LoadableDetachableModel.load() and here I load all data what I need from database and do all DB stufs - open connection, run SQL, close connection. > -----Original Message----- > From: eugenebalt [mailto:[email protected]] > Sent: Tuesday, 26. July 2011 03:12 > To: [email protected] > Subject: How to Catch WebApplication's Destroy()? > > I have a DB connection that I initialize on > WebApplication.init(), which I override. > > At the end, I need to close the DB connection in something > like a destroy method for the app, but I couldn't find any > overridable method for that. I tried overriding > sessionDestroy() but it's not getting called when I close my > browser, according to my debug statements. > > So what's the way to close DB connections at the end of the > Wicket app's lifecycle? Thanks. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-Catch-WebApp > lication-s-Destroy-tp3694556p3694556.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
