facebook

xdoclet javadoc comments not created on remote intf [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #211102 Reply

    boffies
    Member

    Hi,

    We are using MyEclipse 3.8 beta 2 with eclipse SDK 3.0.

    I would like to know if it is somehow possible to ensure that xdoclet copies the javadoc comments on the business methods of my EJB to the remote or local interface that is generated.

    My xdoclet-build.xml file looks like this if it helps:
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project default=”_generation_” name=”XDoclet Generator”>
    <path id=”xdoclet.classpath”>
    <fileset dir=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.jboss.ide.eclipse.xdoclet.core_3.7.200″>
    <include name=”*.jar”/>
    </fileset><pathelement location=”D:/Projects/java/MTNActive/Rules/build”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/rt.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/sunrsasign.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/jsse.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/jce.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/charsets.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/ext/dnsns.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/ext/ldapsec.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/ext/localedata.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/ext/Rational.jar”/>
    <pathelement location=”D:/java/j2sdk1.4.2_03/jre/lib/ext/sunjce_provider.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/activation.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/javax.servlet.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jboss-j2ee.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jboss-jaas.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jsse.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/jts.jar”/>
    <pathelement location=”D:/Apps/MyEclipse/eclipse/plugins/com.genuitec.eclipse.j2eedt.core_3.7.200/data/libraryset/1.3/mail.jar”/>
    <pathelement location=”D:/Apps/eclipse/plugins/org.junit_3.8.1/junit.jar”/>
    <pathelement location=”D:/java/jakarta-log4j-1.2.8/dist/lib/log4j-1.2.8.jar”/>
    <pathelement location=”D:/Projects/java/MTN/lib/utils.jar”/>
    <pathelement location=”/RetailBilling/APP-INF/lib/EntityManager.jar”/>
    <pathelement location=”C:/bea/weblogic81/server/lib/weblogic.jar”/>
    <pathelement location=”D:/Projects/java/MTN/lib/exceptions.jar”/>
    </path>
    <target name=”_generation_” depends=”N10004″/>
    <target name=”N10004″ description=”Standard EJB”>
    <taskdef classpathref=”xdoclet.classpath” classname=”xdoclet.modules.ejb.EjbDocletTask” name=”ejbdoclet”/><ejbdoclet ejbSpec=”2.0″ ejbClassNameSuffix=”Bean” excludedTags=”@author” destDir=”src” verbose=”true” addedTags=”@xdoclet-generated at ${TODAY},@copyright The XDoclet Team,@author XDoclet,@version ${version}” >
    <fileset dir=”src” includes=”**/*.java” >
    </fileset>
    <packageSubstitution packages=”ejb” substituteWith=”intf” >
    </packageSubstitution>
    <remoteinterface>
    </remoteinterface>
    <localinterface>
    </localinterface>
    <homeinterface>
    </homeinterface>
    <localhomeinterface>
    </localhomeinterface>
    <deploymentdescriptor validateXML=”true” destDir=”src/META-INF” >
    </deploymentdescriptor>
    <weblogic destDir=”src/META-INF” >
    </weblogic>
    </ejbdoclet>
    </target>
    </project>

    #211114 Reply

    Riyad Kalla
    Member

    I’ve asked our XDoclet guy to have a look-see at this for you.

    #211161 Reply

    Greg
    Member

    Are you trying to preserve business method comments in a Session, Entity, or MessageDriven bean? I have tested adding javadoc comments to business methods in both Session and Entity beans and it appears to work. Could you post some sanitized source of your EJB so we can determine your problem?

    #211177 Reply

    boffies
    Member

    Hi Greg,

    It actually seems to be working on my local business interface, but not on my remote interface. I cannot find a way of adding an attachment, so I am pasting it in here:

    /**
    * This is a Stateless Session Bean that is the Component Services Interface
    * for all the Rules Services of the Retail Billing System.
    *
    * @author <a href=”mailto:bothne_a@mtn.co.za”>Andreas Bothner</a>
    * @version 1.0
    * @since 2004-07-23
    *
    * @ejb.bean name = “RulesCSI”
    * type = “Stateless”
    * display-name = “Rules Component Services Interface”
    * view-type = “remote”
    * jndi-name = “ejb/RetailBilling/RulesCSIHome”
    * @ejb.transaction type = “Supports”
    *
    * @weblogic.pool max-beans-in-free-pool = “10”
    * initial-beans-in-free-pool = “2”
    * @weblogic.clustering home-is-clusterable = “True”
    * home-load-algorithm = “RoundRobin”
    * stateless-bean-is-clusterable = “True”
    * stateless-bean-load-algorithm = “RoundRobin”
    * stateless-bean-methods-are-idempotent = “True”
    * @weblogic.enable-call-by-reference True
    * @weblogic.transaction-descriptor trans-timeout-seconds = “0”
    */
    public class RulesCSIBean extends EJBSession implements SessionBean
    {
    private static Logger logger = Logger.getLogger(“billing.retail.Rules”);

    /**
    * @todo An example business method
    *
    * @param packageCode
    * @return
    *
    * @throws EJBException Thrown if the instance could not perform
    * the function requested by the container because of an system-level error.
    *
    * @since 1.0
    *
    * @ejb.interface-method view-type = “remote”
    */
    public RuleViolationsDTO applyUpgradeRules(String packageCode) throws EJBException {
    logger.debug(“applying Upgrade Rules to: ” + packageCode);

    RulesBSLocal rules = null;
    try {
    Context ic = new InitialContext();
    RulesBSLocalHome rulesBSHome = (RulesBSLocalHome)ic.lookup(“ejb/RetailBilling/RulesBSLocalHome”);
    rules = rulesBSHome.create();
    }
    catch (NamingException nex) {
    throw new EJBSystemFailureException(nex);
    }
    catch (CreateException cex) {
    throw new EJBSystemFailureException(cex);
    }

    RuleViolationsDTO violatedRules = rules.applyUpgradeRules(packageCode);
    return violatedRules;
    }
    }

    Thanks,
    Andreas

    #211194 Reply

    Greg
    Member

    Andreas,

    Thanks for submitting your file. The problem is the default ejb configuration excludes @todo tags. If you are using the “Standard EJB” xdoclet configuration there is a small setting you need to change if you want to use @todo. Open up the MyEclipse-Xdoclet configuration page and select “ejbdoclet” in the list. Then on the right you will see “excludedTags”. By default this contains the “@todo” tag. Remove this, save the configuration.

    However, just by removing the @todo from the excludedTags isn’t enough to get the comments to transfer correctly. If you place some extra comment text prior to the @todo. XDoclet generates all of the comments correctly in the remote interface.

    
    public class RulesCSIBean extends EJBSession implements SessionBean {
    
        /**
         * some extra comment text
         * @todo An example business method
         * 
         * @param packageCode
         * @return 
         * @throws EJBException
         *             Thrown if the instance could not perform the function
         *             requested by the container because of an system-level error.
         * 
         * @since 1.0
         * 
         * @ejb.interface-method view-type = "remote"
         */
        public RuleViolationsDTO applyUpgradeRules(String packageCode) throws EJBException {

    These two things should get it working for you. Let us know if there is any other problems.

    #211309 Reply

    boffies
    Member

    Hi Greg,

    Thank you that works.

    Andreas

    #211310 Reply

    boffies
    Member

    Hi Greg,

    Thank you that works.

    Andreas

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: xdoclet javadoc comments not created on remote intf [Closed]

You must be logged in to post in the forum log in