• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XDoclet in Action by Norman Richards, Craig Walls

 
Bartender
Posts: 962
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<pre>Author/s : Craig Walls, Norman Richards
Publisher : Manning
Category : Miscellaneous Java
Review by : Ajith Kallambella
Rating : 9 horseshoes
</pre>
An invaluable book about an indispensable framework!
Remember your first J2EE Hello World app? Just to make that client work, you had to write the remote and home interfaces, and a deployment descriptor. If you wrote the Web version, add web.xml to your list. Let's not forget those configuration files for your app/web servers. Now, think of a framework that fabricate all the nuts and bolts for you -- generating deployment descriptors, EJB homes, remotes, app server files, struts-config.xml and more. No, you are not day dreaming, XDoclet can do all and more!
Quoting several opportunities that exist for automated code generation, authors introduce XDoclet framework as an indispensable tool that actually works! Focusing on every day J2EE development, chapters in "Enterprise Java" section talk about the application of XDoclet in EJB layer and Web application layer. Following are chapters in the "Other XDoclet applications" category that introduce advance applications such as code generation for persistence frameworks, JMX, SOAP/WebServices and mock objects. The concluding section on "Extending XDoclet" deals with custom code generation and XDoclet patterns.
Abundant practical help and many working examples are offered throughout the book including the process of tool adoption for J2EE efforts that are already underway. The working J2EE application that is included in the book can be used as a reference implementation.
In essence, this book does more than just teaching -- it helps you realize the benefits of XDoclet in days and start saving valuable time and money.


More info at Amazon.com
More info at Amazon.co.uk
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just got this yesterday. i tried to use it for setting up a fairly simple web.xml and it seems kind of thin on examples there. chapter 4, which is the servlet chapter has one example early on (listing 4.1) that is incomplete. it has a webdoclet task with an attribute
mergeDir="${merge.dir}"
and never explains what mergeDir is. the back of the book (appendix b) shows an attribute for the <deploymentdescriptor> subtask of "welcomefiles", but when i run xdoclet-1.2 i get an error saying this attribute is not defined (willing to admit this might be my goof). and, back to listing 4.1, one of the attributes that *is* shown for deploymentdescriptor is:
distributable="false"
and no explanation is given what that means. appendix B gives the helpful, heh heh, explanation that this attribute "Specifies whether a servlet is distributable." okay, what does that mean?
so right now i am finding this book kind of frustrating
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by john guthrie:
so right now i am finding this book kind of frustrating


I'm sorry that you're finding the book frustrating. I'll acknowledge that the book is less than perfect (it's funny how many things you spot *after* the book goes to print). But hopefully we've not made too many goofs. If we did, please let me know and we'll attempt to address them.
In the meantime, let me address some of your concerns.
- Merge points and the purpose of the mergeDir attribute are discussed in more detail in section 2.6. By the time you get to listing 4.1, I assumed that you had read the earlier sections of the book and, in the interest of not repeating myself, I chose not to explain mergeDir again. In short, merge files are a way to inject your own hand-written code into the generated code--mergeDir specifies the location of the merge files.
- I just tried the "wecomefiles" attribute. And you're right. It doesn't work. I think I know why, but I'll need to get back with you to let you know how it should work.
- The "distributable" attribute, when set to "true" inserts a <distributable/> entry in the generated web.xml. Per the DTD's documentation, this entry "indicates that this web application is programmed appropriately to be deployed into a distributed servlet container." Sorry that the entry is too terse. I falsely assumed that the brief description would be enough.
Again, sorry for any confusion. If you have any further questions, I invite you to post to the Author's forum on Manning's site (www.manning.com/walls) and I promise to get to the asap.
[ January 28, 2004: Message edited by: Craig Walls ]
[ January 28, 2004: Message edited by: Craig Walls ]
 
Craig Walls
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by john guthrie:
shows an attribute for the <deploymentdescriptor> subtask of "welcomefiles", but when i run xdoclet-1.2 i get an error saying this attribute is not defined (willing to admit this might be my goof).


Okay...here's the verdict:
The "welcomefiles" attribute is a special kind of attribute. Admittedly, I haven't tried out each and every attribute in the appendices (time and resources prohibited me from trying all of them). "welcomefiles" is one that I never got a chance to try out. And, as a result I'm sorry to say that the appendix entry is incomplete. So, today both you and I are going to learn something...
Instead of using "welcomefiles" as a straight attribute like you would some others, you use it as a sub-element of <deploymentdescriptor>. Furthermore, you don't use it in its plural form--it's used as "welcomefile". So, here's what your build might look like if you decide to take advantage of the "welcomefiles" attribute:

So, the "welcomefiles" attribute breaks down into subelements called "welcomefile" with a "file" attribute.
Incidentally, the "contextParams" and "tagLibs" attributes work the same way. In the case of "contextParams", you have a "contextParam" subelement with "name" "value", and "description" attributes. In the case of "tagLibs", you have a "tagLib" subelement with "uri" and "location" attributes.
Once again, I'm terribly sorry that this was missed in the book. And many many many thanks to you for pointing it out so that we know to correct it for future printings. While I hate to hear that someone is disenchanted with the book, I'm happy that you've given me the information I need to correct it.
 
john guthrie
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
of course i didn't read chapter 2, i am too smart for that (heh heh). i guess the book could get kind of long if you repeat stuff, but still it is nice to be able to use it as a reference without having to go back to the beginning and read through.
i *greatly* appreciate your help and feedback. i meant to imply in my previous post that i think this is going to be a truly useful book for me...
 
reply
    Bookmark Topic Watch Topic
  • New Topic