On Fri, 7 Dec 2001, David Budworth wrote:

> My class structure is:
> java.lang.Object
>  \- BeanBase
>      \- EntityBase implements EntityBean
>          \- ApplicationBean (implements nothing)
> 
> Where ApplicationBean is the only real bean there, the others are just
> for common functionality.
> 
> But when I run xdoclet, it attempts to make
> ApplicationDataObject extends EntityBaseDataObject
> 
> Of which there is none.  In fact, EntityBase has no ejbdoclet tags at
> all in it.
> 
> Is there some magic incantation to keep this from happening?  Or do I
> need to make every bean that derives from EntityBase have
> @ejb:dataobject   extends="java.lang.Object"

you dont actually need to put the extends in (from my reading of the
code).  if you just put the @ejb:data-object (not @ejb:dataobject) in,
then it will default to Object.

> Or maybe make every real ejb implement EntityBase and take it off of
> EntityBase?
> 
> xdoclet does not attempt to generate the EntityBaseCMP (or any class for
> EntityBase).  It just seems that DataObject generation is not on the
> clue-train as to what's what.

thats odd that it doesn't generate a base dataobject for EntityBase... 

> Also, I see that if I remove the "implements EntityBean" from
> EntityBase, and don't add it to the CMP beans, the generator crashes
> (but it steps on the exception so I don't know where).
> 
> It seems that I MUST implement EntityBean, even though the CMP object
> (which extends my Bean class) implements it itself.  Is that a bug?

that changed a while ago, the notion being that why require a comment for
something you can get from the code (implemnts EntityBean)...  but the
crash sounds like a bug... it should just ignore the class silently...

so in summary, there's two things here:
  - why isn't EntityBaseDataObject generated?  To answer this, set the
log4j config to debug for TemplateSubTask.matchesGenerationRules and
DataObjectSubTask.matchesGenerationRules - hopefully that'll provide an
insight there.
  - why is xdoclet crashing when you have a base entity bean that doesn't
implement EntityBean.  Am I reading this right?  you have an abstract base
that does very little other than provide some common functionality?  and
if you have it _not_ implementing EntityBean it crashes?  that is
weird... put that on the later pile I'm afraid (o:

cheers
dim


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to