struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Durham <>
Subject Re: Retrieve Data List
Date Wed, 06 Sep 2006 15:32:46 GMT
Rokariya, Raman wrote:
> Hi, 
> I am developing Web Client using Struts framework. I am facing problem
> in following scenarios. 
> My application has a Pop Up Window which refreshes after some regular
> interval (minutes). The first time when the window opens, the data which
> is displayed in 
> Tabular Grid is fetched through the Web service Call from the Database. 
> Now, during subsequent refreshes of the window , I don't want to perform
> the Database hit (web service call). The Data to be loaded in tabular
> grid (I am using displayTag library) should be available From the Web
> Server. 
> I have tried using the Session object. It works fine. However, we want
> to avoid using the Session object due to its limitations.
> I have also tried using ThreadLocal object. But during refresh of the
> page, the list which was stored in ThreadLocal during first call of the
> web service, is lost.
> I am sure someone may have faced similar problems before, Any ideas to
> solve the above problem would be helpful and appreciated.

This isn't a struts specific issue, so perhaps this is not the best list 
for your question.  In general, you've entered into the domain of 
"caching," and the problem is rarely so simple as "which object should 
hold this data."  However, if you're looking for a web application scope 
to use in order to reduce data retrieval, and you have a relatively 
small ResultSet, then "application" and "sesion" are likely candidates. 
  Using ThreadLocal is not a good idea for caching beyond the lifecycle 
of a single "request," SFAIK.

So maybe look at display tag's implementation of the value list pattern, 
and search for a caching framework.  Struts does not provide this feature.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message