I'm going to bump this with some more information... I see that Application's getSharedResources() is final, as is SharedResources's get() method. So, that doesn't seem like it would work. SharedResourceRequestTarget is referenced in several places directly (not using a factory), so that's probably not ideal. Also, there would be a lot of code duplication in it's get() method. So, still looking for a solution to this issue. Seems pretty critical for extending an application in the cloud.
Thanks! Jake jbrookover wrote: > > Hello all, > > I¹m running Wicket on Google App Engine. Things have been going fairly > well, but I¹ve encountered a new issue. GAE, at any moment, can wipe and > restart your application. In doing so, you lose everything including > anything you¹ve added to SharedResources. Unfortunately, this can happen > in > the middle of a page load as illustrated here: > > -Page request comes in > -Nifty MarkupFilter reads initial markup and creates some SharedResources > (for a variety of image states based on the filename in the markup) > -MarkupFilter sets the URL in the markup based on the URL provided by the > mounted SharedResource (e.g. ³img/logo.png² becomes > ³/resources/INDIRA/img/logo_d.png² because I wanted the disabled version). > -Markup is returned to the browser > -GAE restarts the application, losing the added SharedResource mapping > -Browser requests the resource according to the mounted URL > -Wicket cannot find resource, missing image > > My current hack idea is to add any shared resource to the GAE MemCache > (URL > maps to File). That works, but now, I just need to know where Wicket > actually looks up the file so I can add a fallback to check the GAE > MemCache > if the file is not found. My understanding is that the mounted > SharedResource path resolves to an actual path in the ServletContext, but > I > can¹t figure out where that is happening. > > I initially thought that I would just override SharedResources.get(), but > I > don¹t think that is called when simply handling requests. I also found > references to WebRequestCodingStrategy.RESOURCES_PATH_PREFIX, but none of > that seemed to help. Finally, I dove deep into WicketFilter, > WebRequest/Response, SharedResourceRequestTarget etc but got completely > lost. I assume it¹s in there someplace, though. > > Any help would be appreciated. > > Thanks! > > Jake > > -- View this message in context: http://old.nabble.com/GAE-loses-shared-resources-tp28205198p28219156.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org