Declarative Caching Services for Spring by Alex Ruiz — Caching is an essential practice that improves the performance of enterprise applications. In this article, Alex Ruiz demonstrates a declarative caching framework for Spring 2.0, which supports pluggable cache implementations.
spring, spring2.0, caching, aspectj, AOP, SpringAOP, XStream
Just saw this article on eWeek. The article states that BEA is slated to announce plans to open-source portions of its WebLogic Workshop tool at the upcoming eWorld conference. BEA has a pretty good record of supporting open-source software and the XMLBeans project is a good example of that. I think the support of AspectWerkz is another example.
If BEA does open-source some of the features of Workshop, this could really help the Eclipse Webtools platform project. I am not a Workshop power user by any stretch of the imagination, but it still does have some pretty cool features. It would be nice to incorporate things like page flow and some of the other cool features into the Eclipse webtools product – Give IntelliJ’s Fabrique a run for the money.
Earlier in the month, I blogged about Servlet Filters and how I see them as Aspects in the AOP world. Based on the blog entry, I’ve gotten tons of email from people that wanted to know more about Servlet Filters, how to use them and how to use the simple Authentication filter I used as an example. I also got quite a few emails from people that wanted to know what other filters I used and so I am including some resources that I find very helpful along with a few servlet filters that I use every day.
Servlet Filter Tutorials
Servlet Filter Apps
If you know of any other Servlet Filters that are useful, drop me an email or send me trackback.
I was just discussing this idea of Servlet Filters with a friend and I was trying to explain to him how Filters work and how they are really aspects in the AOP world. I think filters are really incredibly helpful and yet very few developers know about them and even fewer developers implement them. So my thought was that if we started using buzzwords like AOP around filters, suddenly Filters become sexy and everyone’s jumping over to implement Filters.
The filter API was introduced in the Servlet 2.3 specification and is defined by the Filter, FilterChain, and FilterConfig interfaces in the javax.servlet package. You define a filter by implementing the Filter interface. A filter chain, passed to a filter by the container, provides a mechanism for invoking a series of filters. A filter config contains initialization data. The most important method in the Filter interface is the doFilter() method, which is the heart of the filter. Filters intercept request to your web application based on the url-pattern specified in the web.xml, where the filters are defined.
I have used Filters extensively and have a few Filters ready to go when I am called into debug applications in production that are misbehaving or just broken. One of the filters I use quite often is a simple authentication filter that makes is easy to ensure consumers of the web application is authenticated. Here’s a simple snippet:
Here’s a copy of the original documented Filter java class.