aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes using Xdoclet to create EJBs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "using Xdoclet to create EJBs" Watch "using Xdoclet to create EJBs" New topic
Author

using Xdoclet to create EJBs

Jim Rock
Ranch Hand

Joined: Mar 20, 2001
Posts: 39
Is it sufficiently mature? Is it well supported? Do you recommend it.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Considering that XDoclet won SD Magazine's Award for Business Integration and Data Tools this spring, I'd say XDoclet is "sufficiently mature"


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
dhiraj mudgil
Greenhorn

Joined: Aug 08, 2003
Posts: 2
Hi,
Can anyone direct me to some page where i can learn more about the use of Xdoclets, with examples.
Cheers!
Dheeraj
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

xdoclet.sourceforge.net/
Originally posted by dhiraj mudgil:
Hi,
Can anyone direct me to some page where i can learn more about the use of Xdoclets, with examples.
Cheers!
Dheeraj


Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Start at www.xdoclet.org. Especially the Resources page seems helpful.
[ August 12, 2003: Message edited by: Lasse Koskela ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Does any IDE support XDoclet?
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Read this for a simple intro
www.onjava.com/pub/a/onjava/2002/01/30/xdoclet.html
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
I hear there is a good XDoclet book coming out soon:
http://www.amazon.com/exec/obidos/ASIN/1932394052
I am a bit biased, of course, but it should be a good intro to XDoclet. The ebook version should be available from Manning soon. The print book might be ready as soon as the send of september.
If you are looking to get started with XDoclet now, you might take a look at
Erik Hathers JavaDevWithAnt project. He uses XDoclet in it, so you have the advantage of having an actual working system to look at.
http://www.superlinksoftware.com/cgi-bin/jugwiki.pl?JavaDevWithAnt
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Pradeep,
I actually run XDoclet from within Eclipse.
Check out my blog for a screenshot of auto-completion of Xdoclet tags in eclipse.
Pho


Regards,

Pho
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Norman,
Do we really need a book on Xdoclet ? I learnt the EJB parts of Xdoclet in 2 weeks; and was generating EJBs with relative ease. And when the tedium of tagging CMP/CMR relationships got the better of me; I just use androMDA.
Pho
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16308
    
  22

I actually use a GUI RAD program (EJBWizard) to pull metadata from databases and build the EJB skeleton. However EJBWizard is a template-based genertor, so I have some templates that spit out the XDoclet tags. In addition to getting the best of both worlds that way, I'm also using the WebDoclet + more wizard-generated templates subsystem to create Struts support files.


Customer surveys are for companies who didn't pay proper attention to begin with.
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Originally posted by Pho Tek:
Norman,
Do we really need a book on Xdoclet ? I learnt the EJB parts of Xdoclet in 2 weeks; and was generating EJBs with relative ease. And when the tedium of tagging CMP/CMR relationships got the better of me; I just use androMDA.
Pho

Well, there is a lot more to XDoclet than EJB. That's the application most people use, but that's not it. There's servlets, web frameworks (struts, webwork), application servers (we focus on JBoss and weblogic), JMX, soap, mock objects, Hibernate, JDO. We also talk about general code generation principles and best practices, developing custom XDoclet code generation tasks, and tools like AndroMDA.
The fact that it took you two weeks to learn to just do simple EJBs with XDoclet suggests to me there is a good market for the book. It shouldn't take nearly that long.
But now that you've already invested the time to learn XDoclet, do you need a book? If you are perfectly happy with what you are doing and don't need/want to customize your generated code or go any deeper with XDoclet, then you probably can find a better use for your $30.
I do think we've managed to make the book useful both to XDoclet novices and to more experienced XDoclet users. The feedback we got from the reviewers confirmed this, but you'll have to judge for yourself. Take a look at it at the bookstore when it comes out and let me know what you think.
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

norman,
Is there any plan for Javaranch book promotion?
Sam Kebab
Ranch Hand

Joined: Jan 23, 2002
Posts: 104
I have tried it with the lomboz plugin for eclipse and it works like magic.
Question: after you generate all your other classes/ejb-jar...and others through xdoclet, do you edit your call-back methods?
I ask this because the generated class files have a comment - "do not edit this - generated by ...". Ok so what if i want to write an implementation inside eg. ejbRemove() etc.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
... Ok so what if i want to write an implementation inside eg. ejbRemove() etc.

Aren't you supposed to write the ejbRemove() implementation into the same bean implementation class where you define your @xdoclet tags?
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Originally posted by Pradeep Bhat:
norman,
Is there any plan for Javaranch book promotion?


I haven't talked to anyone at Javaranch yet about it, but I am sure we will do one.
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Originally posted by Sam Kebab:
I have tried it with the lomboz plugin for eclipse and it works like magic.
Question: after you generate all your other classes/ejb-jar...and others through xdoclet, do you edit your call-back methods?
I ask this because the generated class files have a comment - "do not edit this - generated by ...". Ok so what if i want to write an implementation inside eg. ejbRemove() etc.


All you need to do is create the ejbRemove() method in your bean class. If you do that, the XDoclet generated ejbRemove() (in the generated subclass) will call super.ejbRemove(). XDoclet is pretty smart about what it generates.
Sam Kebab
Ranch Hand

Joined: Jan 23, 2002
Posts: 104
Thanks for the response. That's terrific.
Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

Norman,
The fact that it took you two weeks to learn to just do simple EJBs with XDoclet suggests to me there is a good market for the book. It shouldn't take nearly that long.

That included writing templates to plugin our own support code. I ended up ditching Xdoclet ValueObjects in preference to our own implementation. I guess for the masses of people who doesn't have time to read Xdoclet code and experiment; a book is welcomed. But for me, experience is the best teacher.
Good luck on your book.
Pho
norman richards
Author
Ranch Hand

Joined: Jul 21, 2003
Posts: 367
Originally posted by Pho Tek:

a book is welcomed. But for me, experience is the best teacher.


For what it's worth, that's how I learned XDoclet too...
 
 
subject: using Xdoclet to create EJBs