Once you have access to the HiveMind registry, you should able to get the HttpServletRequest from the hiveMind service tapestry.globals.HttpServletRequest
(in the module descriptor tapestry.globals.xml) I have not tried retreiving the above HttpServletRequest hivemind serivce inside a sessionDestroyed(HttpSessionEvent). The above is only a suggestion. Shing --- [EMAIL PROTECTED] wrote: > Thanks for taking a look at my problem. However, I > still don't think I > can get the ASO from within the listener. > > While within the sessionDestroyed(HttpSessionEvent) > method in the > HttpSessionListener I don't have the source data (a > HttpServletRequest/Response) to create a WebRequest > object with which to > populate the SessionScopeManager. > > I guess I still remain confused about the dependency > of > SessionScopeManager on the WebRequest object to > retrieve the WebSession, > and any way to retrieve the ASO from outside of the > request/response > cycle. > > Any advice is greatly appreciated, > > -jason > > > -----Original Message----- > From: Shing Hing Man [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 14, 2006 3:12 PM > To: Tapestry users > Subject: Re: Access Session-scoped ASO from > HttpSessionListener > > > > >The problem here is that the SessionScopeManager > depends on a > >WebRequest > >being injected to retrieve the WebSession. During > execution of the > >HttpSessionListener, no WebRequest is available, > and > as such the method > >call to the SessionScopeManager to retrieve a > session > scoped ASO throws > >a NullPointerException in getWebSession (at or > about > line 53). > > You might like to try manually setting the > property > 'webRequest' in the > (the hivemind service) > tapestry.globals.RequestGlobals. > The following post in the archive shows how to do > it. > > http://article.gmane.org/gmane.comp.java.tapestry.user/39168/match=shing > > Shing > > > > --- [EMAIL PROTECTED] wrote: > > > > > I know this has been discussed here recently, but > I > > haven't really seen > > a satisfactory conclusion yet. Perhaps someone > can > > clear this up for > > me. > > > > --- Our situation --- > > > > We have a need to, upon session timeout, clean up > a > > number of file > > system resources that may have been created by the > > application user. > > The (apparently) only available method to do this > > reliably is the > > HttpSessionListener. > > > > In order to accurately locate these file system > > resources, we need to > > retrieve a String value from a Session scoped ASO. > > > > > I have seen the various methods to retrieve the > > Hivemind registry and > > the ApplicationStateManager, however, I have run > > into a problem. > > > > --- The Problem --- > > > > The ApplicationStateManager depends upon the > > SessionScopeManager for > > session scoped ASOs. The SessionScopeManager uses > a > > WebSession object > > to retrieve ASO objects for return. > > > > The problem here is that the SessionScopeManager > > depends on a WebRequest > > being injected to retrieve the WebSession. During > > execution of the > > HttpSessionListener, no WebRequest is available, > and > > as such the method > > call to the SessionScopeManager to retrieve a > > session scoped ASO throws > > a NullPointerException in getWebSession (at or > about > > line 53). > > > > --- The Question --- > > > > Why does SessionScopeManager depend on the > > WebRequest to retrieve the > > session? What am I missing here, and what, if > any, > > recourse to I have > > to retrieve a session scoped ASO from withi the > > HttpSessionListener? > > > > Grateful for any insight, > > > > -jason > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > Home page : > http://uk.geocities.com/matmsh/index.html > > > > ___________________________________________________________ > > Try the all-new Yahoo! Mail. "The New Version is > radically easier to > use" - The Wall Street Journal > http://uk.docs.yahoo.com/nowyoucan.html > > --------------------------------------------------------------------- > 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] > > Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ The all-new Yahoo! Mail goes wherever you go - free your email address from your Internet provider. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]