摘要: http://ehcache.org/documentation/modules/web-caching#caching-headers官方示例页面缓存SimplePageCachingFilter页面缓存主要用Filter过滤器对请求的url进行过滤,如果该url在缓存中出现。那么页面数据就从缓存对象中获取,并以gzip压缩后返回。其速度是没有压缩缓存时速度的3-5倍,效率相当之高!其中页面缓存的过滤器有CachingFilter,一般要扩展filter或是自定义Filter都继承该CachingFilter。CachingFilter功能可以对HTTP响应的内容进行缓存。这种方式缓存数据的 阅读全文
posted @ 2013-05-31 22:49 大新博客 阅读(4064) 评论(0) 推荐(0) 编辑
摘要: Spring EhCache集成所需jar包Ehcache2.6.6 [ehcache-core-2.6.6.jar] ,Spring3 M2(全部jar) ,slf4j-api-1.6.1.jar,slf4j-jdk14-1.6.1.jar先定义EhCache的配置文件:ehcache.xml 具... 阅读全文
posted @ 2013-05-31 22:00 大新博客 阅读(2464) 评论(0) 推荐(0) 编辑
摘要: How-To: Using Scheduler ListenersCreating a SchedulerListenerExtend TriggerListenerSupport and override methods for events you're interested in.package foo;import org.quartz.Trigger;import org.quartz.listeners.SchedulerListenerSupport;public class MyOtherSchedulerListener extends SchedulerListen 阅读全文
posted @ 2013-05-31 16:50 大新博客 阅读(356) 评论(0) 推荐(0) 编辑
摘要: How-To: Using Trigger ListenersCreating a TriggerListenerImplement the TriggerListener interface.package foo;import org.quartz.JobExecutionContext;import org.quartz.Trigger;import org.quartz.TriggerListener;import org.quartz.Trigger.CompletedExecutionInstruction;public class MyTriggerListener implem 阅读全文
posted @ 2013-05-31 16:47 大新博客 阅读(461) 评论(0) 推荐(0) 编辑
摘要: You can initialize the scheduler with predefined jobs and triggers using the XMLSchedulingDataProcessorPlugin (which, with the 1.8 release, replaced the older JobInitializationPlugin). An example is provided in the Quartz distribution in the directory examples/example10. However, following is a shor 阅读全文
posted @ 2013-05-31 16:43 大新博客 阅读(540) 评论(0) 推荐(0) 编辑
摘要: Adding A Context/Container Listener To web.xml... <context-param> <param-name>quartz:config-file</param-name> <param-value>/some/path/my_quartz.properties</param-value> </context-param> <context-param> <param-name>quartz:shutdown-on-unload</param-na 阅读全文
posted @ 2013-05-31 15:57 大新博客 阅读(584) 评论(0) 推荐(0) 编辑