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

  • Major changes

    In Spring LDAP, we have recently performed a major refactoring of the package structure, and on top of that completely changed the exception hierarchy. It's not released yet, but we're aiming for a version 1.2 within a few months.

    Why did we do this now? We had two problems:

    1. We needed to resolve a package dependency cycle that we've had since the early days, and saw no other way than to perform this rather brutal change. This is the new package dependency graph (which may look confusing to the uninitiated, but the important thing is that it shows no dependency cycles between the packages):


    This is the package structure:


    2. Our exception hierarchy is not rich enough, and exceptions are often just translated into UncategorizedLdapException. The Spring LDAP hierarchy has up to now been based on the DataAccessException hierarchy from Spring JDBC. The main purpose of that hierarchy is to convert from the single checked SQLException into a rich hierarchy of unchecked exceptions, by translating from a vendor-specific error code into a corresponding exception. If the Data Access Object (DAO) interfaces throw DataAccessException, the DAO layer won't be tied to whatever storage technique is used. Initially, we thought that was a cool idea, and began by creating a small hierarchy in Spring LDAP. However, we don't need to translate an error code. The JNDI NamingException hierarchy is already rich. The problem is that they're all checked exceptions.

    We decided to do just like in Spring JMS: mirror the checked hierarchy with an unchecked. So, there is now an unchecked mirror of NamingException and Spring LDAP will automatically translate all exceptions to it. We still have the UncategorizedLdapException, but it will now be used in very rare circumstances. Here is the NamingException hierarchy:


  • #2
    Hi Ulrik, what software did you use it to generate these graphs?

    Thank you,
    Julio Cesar


    • #3
      I use the commercial Structure101 to analyze the structural design of my applications. It's wonderfully simple to use. The package dependency graph is generated from this tool.

      The second picture is just a screenshot from the package explorer in Eclipse.

      The third picture is from an open source mind mapping tool named FreeMind. It was very effective for this type of hierarchical structure.


      • #4
        Ulrik and LDAP-team

        Excellent work on this sub-probject.

        Just started to use it and it's really easy and nice to use.

        And thanks for the head-up for the 1.2 changes.