You have to hack the template to achieve this. Must have something like
this in the template:
public abstract class $table.destinationClassName extends YourBaseBean
implements javax.ejb.EntityBean {
Take a copy of the template, modify and use it like this in the build.xml:
<cmp20..
<fileproducer
id="entity-cmp-20"
template="path.to.your.template.vm"/>
..
</cmp20>
For a more dynamic solution you would have to add the baseclass parameter
to the plugin, check for this and add in the template.
Beware that xdoclet use the xxCMP.java files for some other stuff as
well. For instance value object support adds methods to these classes.
Regards
.eivind
On Wed, 11 Jun 2003, Gregory CHAZALON wrote:
> Hi users,
>
> I'm trying to make the cmp20 plugin to write an "extend xxx" statement for the
> generated entities source files.
>
> In fact, I have a BaseEntityBean class which implements the javax.ejb.EntityBean
> interface and have some logging capabilities. And I want to make every single entity
> bean extending that class.
>
> The main reason to do this is to avoid an error at deployment time because the
> entites generated source files do not implements all the methods defined in the
> javax.ejb.EntityBean (ejbPassivate and so on). Therefore, weblogic rejects me when I
> try to run the ejbc tool.
>
> I know there is the <entitycmp/> tag that do avoid the error at deployment time.
> But, this solution is not acceptable for me as it generates more bulk classes (named
> xxxCMP.java) that only define the missing methods of the interface. I don't want
> that, it's pretty ugly I think :-(
>
> So, has any Middlegen guru achiveved this extending solution ? I can't find any help
> in the documentation.
>
> I will appreciate any idea.
>
> Regards,
>
> Gregory
> ChazalonN�HY隊X���'���u����f�z�(}:-jUb{�y����ky�]y������^�V�z�('y�"�a��u��������*.���ݭ�y�����֥V'����y�p�����i�u�^�����j)b�
> b�٢u�^������l���q���z�m��>��b��,���y�+���b��?�+-�w��h�vW�z{�z
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
middlegen-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/middlegen-user