2008/11/26 Dhanji R. Prasanna <[EMAIL PROTECTED]> > > On Tue, Nov 25, 2008 at 11:22 AM, jordi <[EMAIL PROTECTED]> wrote: > ... > > > > Looking at the console log i see this message when redeploying: > > > > A C3P0Registry mbean is already registered. This probably means that an > > application using c3p0 was undeployed, but not all PooledDataSources were > > closed prior to undeployment. This may lead to resource leaks over time. > > Please take care to close all PooledDataSources. > > > > I guess i'll have to clean up some resources before reloading context.. > > Are you calling close() on the Hibernate SessionFactory? This is very > important. >
+1, or to paraphrase a popular saying: "close early close often" ;) > Also I recommend just bringing down the appserver every time. This > idea that webapps can be redeployed while the server remains up is a > bit silly to me. > you might want to look at GlassFish or the new SpringSource Application Platform (or indeed any of the upcoming OSGi based web servers) - there are many demos and real world applications out there that show that this is possible right now [ with OSGi you can even mix versions of the same web-app in the same process ] that being said, developers should always remember to close resources when done with them - and if you do happen to find a leak, be aware of the usual suspects like logging, but back it up with facts (take a series of heapdumps, use analysis tools) nothing's worse than a finger-pointing session when working on a potential CritSit Dhanji. > > > > -- Cheers, Stuart --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to google-guice@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---