Why should I use XDoclet 2? - No Fluff Just Stuff

Why should I use XDoclet 2?

Posted by: Craig Walls on October 7, 2005

Somehow, when I wasn't looking, XDoclet 2 was released. Apparently it was released some time ago, but it didn't cross my eyes until today.

But, I'm not so sure that I care.

I have been a big fan of XDoclet...so much so that I wrote a book about it. But I find myself using XDoclet less and less lately and am wondering why I should bother with XDoclet 2.

First off, I am no longer troubling myself with EJB 2.x, the primary motivator for XDoclet. If and when I choose to use EJB 3, I'll be using annotations, so XDoclet doesn't apply.

I've also been known to use XDoclet to generate TLD files, web.xml files, and struts-action.xml files. I rarely write my own JSP tags or standalone servlets, and I've not done anything in Struts in well over a year.

At the moment, the only thing I'm still using XDoclet for is to generate Hibernate mapping files. I'm starting to look into using Hibernate 3 annotations, but it'll be awhile before I'm able to migrate all of my production apps to Java 5. So, I still have a "legacy" use of XDoclet and probably will for quite some time.

I suppose that I could switch to XDoclet 2 to generate those mapping files. But what would it buy me? XDoclet 1 still does a great job of generating Hibernate mapping files. What will XDoclet 2 give me that XDoclet 1 doesn't already do? Sure, XDoclet 2 is much better designed than XDoclet 1. But that's "under the covers" stuff. As a user of XDoclet, what's my motivation to switch to XDoclet 2?

I'm not dismissing XDoclet as being useless. Just as I have a legacy need for XDoclet for generating Hibernate mapping files, you may have your own reasons to continue using XDoclet. My question centers around XDoclet 2.

I'm sincerely asking: Can anyone tell me why I should go to the trouble of switching to XDoclet 2?

Craig Walls

About Craig Walls

Craig Walls is a Principal Engineer, Java Champion, Alexa Champion, and the author of Spring AI in Action, Spring in Action, and Build Talking Apps. He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring. When he's not slinging code, Craig is planning his next trip to Disney World or Disneyland and spending as much time as he can with his wife, two daughters, 1 bird and 2 dogs.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »