I am trying to implement EJB EntityBeans with inheritence. Since the
basic EJBeanclass X inherits a superclass Y (also an EJB), Xdoclet
correctly adds the signatures of all findermethods in the superclass
to the descriptor-part of Class X. But Xdoclet does not come the
signatures to the LocalHome Interface.
Here is the part of the build file that I used for that:
<target name="xdoclet.build.interfaces" >
<ejbdoclet destdir="${generated.src.dir}"
excludedtags="@version,@author,@see" force="${force.ejb}"
ejbspec="2.0">
<fileset dir="${src.dir}" includes="">
<include name="${module.dir}/**/*Bean.java" />
</fileset>
<!-- Generate localinterfaces -->
<localinterface>
<packageSubstitution packages="ejb" substituteWith="interfaces" />
</localinterface>
<localhomeinterface>
<packageSubstitution packages="ejb" substituteWith="interfaces" />
</localhomeinterface>
<deploymentdescriptor destdir="${module.ejb.metainf.dir}"
validatexml="true" />
<jboss version="3.2" destdir="${module.ejb.metainf.dir}"
mergeDir="${module.resources.dir}/mergedir" />
<!-- Generate deployment descriptors -->
</ejbdoclet>
</target>
And here the XDoclet-Tags in the src-file:
Superclass:
* @ejb.bean name="DeviceRecord" type="CMP" description="abstract
db-representation
* of a network device" primkey-field="id" view-type="local" cmp-version="2.x"
* schema="DeviceRecord" local-jndi-name="DeviceRecordLocal"
*
* @ejb.persistence table-name="core_devices"
*
* @ejb.finder signature="java.util.Collection findAllDevices()"
* query="SELECT Object(p) FROM DeviceRecord AS p"
class that inherits Superclass:
* @ejb.bean name="FTPDeviceRecord" type="CMP" description="db-representation
* of a network device" primkey-field="id" view-type="local" cmp-version="2.x"
* schema="FTPDeviceRecord" local-jndi-name="FTPDeviceRecordLocal"
*
* @ejb.home local-extends="javax.ejb.EJBLocalHome"
*
* @ejb.interface local-extends="vmdb.db.interfaces.DeviceRecordLocal"
*
* @ejb.finder
* signature="java.util.Collection findAllDevices()"
*
* @ejb.finder signature="java.util.Collection findAllFTPDevices()"
* query="SELECT Object(p) FROM FTPDeviceRecord AS p"
* view-type="local"
* method-intf="LocalHome"
*
* @ejb.persistence table-name="ftp_devices"
*
*
* @jboss.entity-command name="get-generated-keys
The generated LocalHomeInterface:
public interface FTAMDeviceRecordLocalHome
extends javax.ejb.EJBLocalHome
{
public static final String
COMP_NAME="java:comp/env/ejb/FTAMDeviceRecordLocal";
public static final String JNDI_NAME="FTAMDeviceRecordLocal";
public vmdb.db.interfaces.FTAMDeviceRecordLocal create()
throws javax.ejb.CreateException;
public java.util.Collection findAllFTAMDevices()
throws javax.ejb.FinderException;
public vmdb.db.interfaces.FTAMDeviceRecordLocal
findByPrimaryKey(java.lang.Integer pk)
throws javax.ejb.FinderException;
}
As can be seen, the method findAllDevices is not copied.
How can i force XDoclet to write the methods to the LocalHomeInterface?
Regards Christian
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user