Let's see what I can throw at this.
1. Make sure your real bean class names match the pattern for your fileset:
<fileset dir="${src.dir}">
<include name="**/*EJB.java"/>
</fileset>
Our beans are AddressEJB, UserEJB, etc. Also, your base bean needs to be run through
EJBDoclet as well (I just tested it and it doesn't compile without it). Our beans DO
NOT implement the EntityBean interface -- only BaseEJB does that. It all works fine
(1.2b2).
2. The FooCMP classes ARE your real beans. You don't want EJBDoclet modifying your
source files to inject the value object code. Thus, it has to create a subclass of
your bean to add that functionality. You say your base bean class implements all the
functionality you need, yet you then want EJBDoclet to put the value object stuff into
your beans. Therefore, you DO want the extra functionality provided by the FooCMP
classes. Again, the FooCMP is not a helper class per se, it is your complete bean.
Peace,
Dave
David Harkness
Sony Pictures Digital Networks
-----Original Message-----
From: Gregory CHAZALON [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:24 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] ejbdoclet generation problem for EJB that do not directly
implement the javax.ejb.EntityBean
Hi XDoclet users,
maybe some of you have the same problem. I'm using Xdoclet and Middlegen to generate
my EJB source skeletons from my database. Since I want every single EJB to inherit a
common superclass with logging capabilities, I have hacked the code template in
Middlegen so as it generates CMP EntityBean like this :
public abstract class $table.destinationClassName extends
dk.steria.nes.midtier.BaseEntityBean
instead of the default template
public abstract class $table.destinationClassName implements javax.ejb.EntityBean
The problem is when I try to run XDoclet on the first type of Bean class, it simply
ignores all of them and does not generate anything, even though the
dk.steria.nes.midtier.BaseEntityBean does implement the javax.ejb.EntityBean !!!! How
can I force XDoclet to consider my classes as EJB classes ?
By the way, my second question concerns the xxxCMP.java files generated by the
<entitycmp/> tag. It seems that those classes implements methods of the EntityBean
interface and also handles the value object feature. In fact, I'd like to get rid of
those classes since my BaseEntityBean implements all the required methods.
How am I supposed to tell XDoclet to generate the value object feature inside my Bean
class instead of adding an xxxCMP Helper class ?
So, has any XDoclet guru achiveved this ? I can't find any help in the documentation.
I will appreciate any idea.
Regards,
Gregory
NHSMéŠX²š²Šu¼¬æu沉}øz׆z¢àÊz
X’z§ÿuöšg‰ª{›öýÉï]ׯëÝçrWºÇ™¨ŠxŠËv‡zÛz¹²Û¢êyú鶦ϖ+²ÊÇ¢¸ë–+³ù²Ø~v‡zÛ
�+�zf��+,��좷�o'�k!�y�]y�l�z~'��!��h�*'x����'$��ކ�i���}���bj�^��&��rO��]u����^�����n���j)b�
b��]��^���X���(��~��zw���i����l���q���z���l�X��)ߣ�]��^��