RE: Generation problems

"Lewis, Grant" <[email protected]>
Newsgroups gmane.comp.java.xdoclet.user
Message-ID <03642EC064085F4DBB3B40DB5D82F2A205FC157E@SCRA_NT1.SCRA.ORG>
For what it's worth, after some trial and error, I finally discovered the right combination of tags to do the trick. I had to add all the tags and attributes below before xdoclet would generate the classes and deployment descriptor correctly. I tried adding view-type = "both" to the ejb.bean tag but could never get the combination to work without adding the ejb.home and ejb.interface tags.
 
Grant
 
/**
 * Person EJB that uses BMP to store its state
 * to a local database using JDBC and sync a remote
 * database using a web services API.
 *
 * @ejb.bean
 * name  = "Person"
 * type = "BMP"
 * local-jndi-name  = "ejb/PersonLocalHome"
 * jndi-name        = "ejb/PersonHome"
 *
 * @ejb.home
 * local-class      = "gov.seahawk.investigations.person.PersonLocalHome"
 * local-extends    = "javax.ejb.EJBLocalHome"
 * remote-class     = "gov.seahawk.investigations.person.PersonHome"
 * extends          = "javax.ejb.EJBHome"
 * generate         = "local,remote"
 *
 * @ejb.interface
 * local-class      = "gov.seahawk.investigations.person.PersonLocal"
 * local-extends    = "javax.ejb.EJBLocalObject"
 * remote-class     = "gov.seahawk.investigations.person.Person"
 * extends          = "javax.ejb.EJBObject"
 * generate         = "local,remote"
 *
 * @ejb.pk
 * class            = "java.lang.String"
 *
 */
 
 

________________________________

From: [email protected] on behalf of Lewis, Grant
Sent: Tue 4/25/2006 11:18 AM
To: [email protected]
Subject: [Xdoclet-user] Generation problems


I have no idea why xdoclet will not generate code for my concrete EJBs while it does generate code for the abstract EJB all the concrete EJBs extend. Here is the javadoc header of my abstract EJB:
 
/**
 * @ejb.bean
 * name = "WebServiceEntity"
 * generate = false
 */
abstract public class WebServiceBean
        extends GenericEntityBean implements EntityBean {
 
Here is the header for my PersonBean:
 
/**
 * @ejb.bean
 * name = "Person"
 * type = "BMP"
 * local-jndi-name  = "gov.seahawk.investigations.person.PersonHome"
 * jndi-name = "gov.seahawk.investigations.person.PersonRemoteHome"
 *
 * @ejb.pk
 * class = "java.lang.String"
 */
 
I have a sneaky suspicion this is related to the fact I'm generating code for a BMP bean. When I run xdoclet no code is generated for PersonBean. The abstract EJB has local and remote (business and home) interfaces generated.

My ant task:

<target name="ejbdoclet" depends="prepare">
        <ejbdoclet
                destdir="${build.gen-src.dir}"
                ejbspec="2.0"
                verbose="false">

            <fileset dir="${project.dir}">
                <include name="**/*Bean.java"/>
            </fileset>

            <remoteinterface/>
            <localinterface/>
            <homeinterface/>
            <localhomeinterface/>

            <deploymentdescriptor
                destdir="${build.meta-inf.dir}"
                validatexml="true">
            </deploymentdescriptor>
        </ejbdoclet>

</target>

Do I have something missing that's required?

Grant
winmail.dat (application/ms-tnef, 8.1 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.