I have a CMP EJB with a set of XDoclet tags. The tags are used to generate the LocalHome, Local, CMP and VO (value object) classes for the Bean. This all works fine. Now I want to extend the functionality of the VO. Among other things, I want to add compareTo(..) methods for the VO. But there are problems:
1. I can't write a superclass for the VO (which the generated VO would extend) because my compareTo(..) methods need to access the instance variables of the generated VO.
2. I don't want to subclass the generated VO, because then the getXVO() method on the generated CMP class would return the wrong class - it would return the generated VO class, not my subclass.
3. I don't want to remove the XDoclet value object tag in the EJB source, because then its generated CMP class does not contain the getXVO() and setXVO(..) methods I want.
4. I can't see any way to switch off VO generation for a specific EJB in the XDoclet configuration (I'm using Eclipse, JBoss-IDE, and JBoss 3.2). I tried creating two different XDoclet configurations - one with value object generation, and one without. Unfortunately, this approach failed because some container-managed relations extend between EJBs with generated VOs and those without. The fileset exclude settings on each configuration seem to prevent the generator seeing the relevant EJBs.
Currently, I'm letting XDoclet regenerate my special VO, and then dumping my hand-coded source back into the generated file. The work-around is functional, but not elegant!
Does anyone have any ideas here? Surely specialising VOs must be a fairly common thing to do?
Cheers,
Bruno.
------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user