Hi,

Based on an article - I'm trying to use EJB inheritante but Xdoclet is
breaking my legs at this moment. :-)

I have a simple object model. The Section EJB (CMP) is the top-level class.
Below it there is a Comment EJB (CMP)

So, I did:

/**
 * @ejb.bean name="Section"
 *      jndi-name="SectionBean"
 *      type="CMP"
 *  primkey-field="id"
 *  schema="SectionSchema" 
 *  cmp-version="2.x"
 * 
 *  @ejb.persistence 
 *   table-name="BLOODSection" 
 * 
 * @ejb.finder 
 *    query="SELECT OBJECT(a) FROM SectionSchema as a"  
 *    signature="java.util.Collection findAll()"  
 *  
 * @ejb.ejb-ref 
 *    ejb-name="SequenceSession"
 *    view-type="local"
 *    ref-name="ejb/SequenceSessionLocal"
 **/
public abstract class SectionBean implements EntityBean
...


/**
 * @ejb.bean name="Comment"
 *      jndi-name="CommentBean"
 *      type="CMP"
 *  primkey-field="id"
 *  schema="CommentSchema" 
 *  cmp-version="2.x"
 * 
 *  @ejb.persistence 
 *   table-name="BLOODComment" 
 * 
 * @ejb.interface
 *    extends="br.com.codeblood.ejb.Section"  
 *  
 * @ejb.home 
 *    extends="javax.ejb.EJBHome"
 *    local-extends="javax.ejb.EJBLocalHome"
 **/
public abstract class CommentBean extends SectionBean
...


Everything compiles fine. But JBoss refuses to deploy it. So I did a little
investigation and found that the tags from the top level class were
inherited by the subclass resulting in a incorrect deployment descriptor:

      <entity >
         <description><![CDATA[]]></description>

         <ejb-name>Comment</ejb-name>

         ...

         <query>
            <query-method>
               <method-name>findAll</method-name>
               <method-params>
               </method-params>
            </query-method>
            <ejb-ql><![CDATA[SELECT OBJECT(a) FROM SectionSchema as
a]]></ejb-ql>
         </query>

      </entity> 

So you see a findAll inherited from SectionBean. Is there a way to inform
xdoclet that under certains circunstances the tag inheritance behavior
should not be used ?



regards,
hammett


-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to