I have a fairly big web application using JDK 1.5, Spring 1.2.4, Hibernate 3.0.5, and Cocoon 2.1.7. We have a requirement to have encrypted Licenses to be provided to users to restrict things like "30 day trial", or "Cannot add more than XXX number of Users".

My business problem is how to implement the restrictions without putting in specific code for each License restriction in every DAO (i.e. querying the number of users when addUser() is called and validating). Is there an interceptor way of doing this that anyone can think of? Or a better solution in general that someone else has done?

Many thanks,
Dustin