Announcement Announcement Module
No announcement yet.
Implementing License Restrictions Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Implementing License Restrictions

    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,

  • #2
    You can put an interceptor on all your business methods and place the logic there. However, how exactly do you plan to implement the restrictions?


    • #3
      I was thinking that I will have a separate interceptor for each license restriction, which will need to access my Service Layer to perform some checking anyway.

      So for my number of users example, my license interceptor would intercept the addUser() method at the Service Layer and do some checking with the pre-loaded license, which means getting a count of users, then verifying against the license's value. I would have to perform separate checks for everything anyway despite what my original post says.

      Thanks for the response.