Thanx Laurie Harper, I am using jprofiler to monitor instances. you are right that it may be possible that my action classes might be referencing to any long lived objects and that prevents it from being garbage collected.
yeah, for some action classes spring inject singleton scoped service dependecies so that might be reason for those action for not getting garbage collected but i have one action class which doesn't have any thing which can prevent that class from being garbage collected. its as given below: * public* *class* AuctionCentralAction *extends* ActionSupport{ /** * */ *private* *static* *final* *long* *serialVersionUID* = 1L; *private* String catalogList; *private* String previousCatalog; *private* String previousCatalogList; /** * This method is called while loading the Auction central page. * [EMAIL PROTECTED] * */ *public* String initialize() { *this*.catalogList="Auction"; *this*.previousCatalogList = "Auction"; *this*.previousCatalog = "0"; *return* "auctionCentralAction"; } /** * This method is for validating the user going prior to the My personal Account page. * If user is valid then he will take to My personal Account page otherwise same page will * be displayed. * [EMAIL PROTECTED] * */ *public* String viewPersonalAccountInfo() { String returnString; UserContext user = ContextProviderRegistry.*getInstance* ().getContext().getUserContext(); String userRole = user.getUserRole(); *if*(userRole.equalsIgnoreCase("ROLE_USER") == *true*){ returnString = "viewPersonalInfo"; }*else*{ returnString = "auctionCentralAction"; } *return* returnString; } *public* String getCatalogList() { *return* catalogList; } *public* *void* setCatalogList(String catalogList) { *this*.catalogList = catalogList; } *public* String getPreviousCatalog() { *return* previousCatalog; } *public* *void* setPreviousCatalog(String previousCatalog) { *this*.previousCatalog = previousCatalog; } *public* String getPreviousCatalogList() { *return* previousCatalogList; } *public* *void* setPreviousCatalogList(String previousCatalogList) { *this*.previousCatalogList = previousCatalogList; } } In my case ,initialize() method will be executed, can anybody tell me what's there in the above class which can prevent this class from being garbage collected. static data member or what? thanx in advance, Manish On Thu, Mar 27, 2008 at 2:46 AM, Laurie Harper <[EMAIL PROTECTED]> wrote: > Prajapati Manish Narandas wrote: > > Hi All, > > I am using struts2 with spring object factory. > > Here, spring is creating action class objects with request scope and > > injecting service layer dependency and service layer objects are > singleton > > scope. > > > > here, even i have given request scope it doesnt ensure 100 % garbage > > collection of my all action class objects. > > > > Can anybody tell me a way so i can find all action objects garbage > > collected once action class has done > > its work. > > > What makes you think the action instances are not being garbage > collected? As long as they are request scoped they will be eligible for > garbage collection as soon as the request they are associated with has > completed processing, unless you are keeping a longer-lived reference to > them somewhere. > > L. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >