Thank you very much Eivind for this trick ! It works perfectly.
By the way, you mention the way xxxCMP.java files are used for Xdoclet value object
feature.
Do you know any workaround to add the value object methods directly inside the bean
source file ?
I really want to get rid off these extra CMP classes...
Thanks again anyway
Best regards,
Gregory
----- Original Message -----
From: "Eivind Waaler" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 12:51 PM
Subject: Re: [Middlegen-user] Trying to have my CMP EJBs extending a base class (cmp20
plugin)
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�sSX��s'�S�u����f�z�(}:-jUb{�y����ky�]y�
> ���z�^�V�z�('y�"�a��u��,���s��*.���ݭ�y���"�֥V'����y�p��z��i�u�^�����j)bz
> b�٢u�^�����S�l�<�q���z�m�>>��b��,���y�+���b��?-+-Sw��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-userN�HY隊X���'���u���{�����N�Z�X��8^m�-��i�^n�
z�'����7��
�w���ky�]y���)�}歺��ʋ�zw�z�ky��v���$赩U��:~��j�0��g��(�h�vW�z{�z���X��X��h�vW�z{�z�b��,���y�+��m����+-��.�ǟ�����+-��b�ا~���ez��ǫ