• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extending Weblogics CacheFilter

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I want to extend weblogic's 8.1 weblogic.cache.filter.CacheFilter to customise it with few added functionalities.
I want to change the timeout of the cache filter at runtime, while the timeout of pages is defined in the web.xml's Filter elements tag.

<filter>
<filter-name>CacheFilter3</filter-name>
<filter-class>weblogic.cache.filter.CacheFilter</filter-class>
<init-param>
<param-name>scope</param-name>
<param-value>application</param-value>
</init-param>
<init-param>
<param-name>timeout</param-name>
<param-value>60</param-value>
</init-param>
<init-param>
<param-name>size</param-name>
<param-value>10</param-value>
</init-param>
<init-param>
<param-name>vars</param-name>
<param-value>request.currentWeatherDate</param-value>
</init-param>
<init-param>
<param-name>name</param-name>
<param-value>currentWeather</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CacheFilter3</filter-name>
<url-pattern>/weather/current.jsp</url-pattern>
</filter-mapping>


The timeout of the page is defined in the Web.xml in the Filter Element. Is it possible to change the timeout or any parameter defined in web.xml at runtime ? can i get access of the webserver's implementation of the deployment descriptor i.e web.xml?
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think, that you can change web.xml at run time.
Because web server reads it at the time of application deployment.

Again, it might be possible that web-server periodically read this file,it depends on web-server implementation. But i don't think so that web-server works in this way.
 
Ammar Fakhruddin
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes u r absolutely correct you cannot change the deployment descriptor at run time and server only reads it at start. But is there any possible way that i can access the Bean of the descriptor which could be dynamically updated. OR if i am voilating the apps server specs, then is there anyother way to change the timeout of the cache filter on runtime.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic