|
From: Jozsa K. <dy...@on...> - 2004-06-03 12:12:16
|
Ok.. and what about disposing the container's singletons from a shutdown=20 hook for non-web apps? If close() is not meant for the client view of=20 the context, than the server should take care about it imho. dyn j=FCrgen h=F6ller [werk3AT] wrote: > It's not in the ApplicationContext interface itself, because this is me= ant to be a client view of the context. Simply cast the context reference= to ConfigurableApplicationContext; you can then invoke the close method = there. >=20 > Juergen >=20 >=20 > -----Original Message----- > From: spr...@li... > [mailto:spr...@li...]On Behalf > Of Jozsa Kristof > Sent: Thursday, June 03, 2004 1:14 PM > To: spr...@li... > Subject: [Springframework-developer] about closing bean container >=20 >=20 > Hi, >=20 > I started to wonder today why ApplicationContext interface doesn't=20 > include the close() method to dispose the singleton beans in the bean=20 > container. Is there any reason not to expose this method? On the other=20 > side, wouldn't it make sense to add a shutdown hook to clear up any=20 > still-existing bean containers at least on jvm exit? >=20 > dyn --=20 .Digital.Yearning.for.Networked.Assassination.and.Xenocide. |