> Hello, list.  I have a simple little class that I'm trying to use to
> get started with XDoclet (v1.2 b2), but my ejb-jar.xml turns up empty
> (except for the generated placeholders) and I can't seem to generate
> interfaces. I've tried a few variations of the attached, and nothing
> seems to work. What am I not doing?

I had this problem when the EJB Bean was a subclass of another bean that
implemented EntityBean/SessionBean interface with empty implementations of
the some methods

>
> TIA,
>
> Bill
>
> build.xml:
> ----------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
>
> <project name="RandA" default="ejb-doclet" basedir="..">
>
>  <target name="ejb-doclet">
>
>    <path id="xdoclet-lib">
>      <fileset dir="c:/progra~1/xdoclet/lib">
>        <include name="*.jar"/>
>      </fileset>
>    </path>
>    <taskdef name="ejbdoclet"
>      classname="xdoclet.modules.ejb.EjbDocletTask"
>      classpathref="xdoclet-lib"
>    />
>
>    <ejbdoclet ejbspec="2.0"
>               force="true"
>               verbose="true"
>               destDir="../com/avnet/sbs/randa/cmp">
>
>      <fileset dir="../com/avnet/sbs/randa/cmp">
>        <include name="**/*Bean.java"/>
>      </fileset>
>
>      <localinterface/>
>      <localhomeinterface/>
>
>      <deploymentdescriptor destdir="config/sandbox/META-INF"/>
>
>    </ejbdoclet>
>  </target>
>
> </project>
>
>
> Output:
> ----------------------------------------------
> $ ant ejbdoclet
> Buildfile: build.xml
>
> ejbdoclet:
> [ejbdoclet] Running <localinterface/>
> [ejbdoclet] Running <localhomeinterface/>
> [ejbdoclet] Running <deploymentdescriptor/>
> [ejbdoclet] Generating EJB deployment descriptor (ejb-jar.xml).
>
> BUILD SUCCESSFUL
> Total time: 9 seconds
>
>
> PolicyBean.java:
> ----------------------------------------------
> package com.avnet.sbs.randa.cmp;
>
> import javax.ejb.EntityBean;
> import javax.ejb.EntityContext;
>
> import java.util.Collection;
>
> /**
> * Models an Avnet policy definition.
> *
> * @author       [EMAIL PROTECTED]
> * @version      1.0.0
> * @ejb.bean
> *   name="Policy"
> *   schema="Policy"
> *   type="CMP"
> *   cmp-version="2.x"
> *   primkey-field="policyId"
> *   view-type="local"
> *   local-jndi-name="randa/Policy"
> * @ejb-persistence
> *   table-name="Policy"
> * @ejb.pk
> *   class="java.lang.Integer"
> * @ejb.home
> *   generate="local"
> *   local-class="com.avnet.sbs.randa.cmp.PolicyHome"
> * @ejb.interface
> *   generate="local"
> *   local-class="com.avnet.sbs.randa.cmp.Policy"
> *
> */
> public abstract class PolicyBean implements EntityBean {
>
>  /**
>   * @ejb.interface-method
>   *   view-type="local"
>   * @ejb.persistence
>   *   column-name="PolicyID"
>   */
>  public abstract Integer getPolicyId();
>  public abstract void setPolicyId(Integer id);
>
>
>  /**
>   * @ejb.interface-method
>   *   view-type="local"
>   * @ejb.persistence
>   *   column-name="Title"
>   */
>  public abstract String getTitle();
>  public abstract void setTitle(String title);
>
>  public void setEntityContext(EntityContext context){ }
>  public void unsetEntityContext(){ }
>  public void ejbRemove()throws javax.ejb.RemoveException{ }
>  public void ejbLoad(){ }
>  public void ejbStore(){ }
>  public void ejbPassivate(){ }
>  public void ejbActivate(){ }
> }
>
>





-------------------------------------------------------
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.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to