You have to tell xdoclet that it is an interface method using the @ejb.interface-method tag such as shown below. Seee the docs for more info
http://xdoclet.sourceforge.net/tags/ejb-tags.html#@ejb.interface-method%20(0..1) /** * @ejb.interface-method * Calulates the compound interest on the sum `principle', with interest rate$ period `rate' over `periods' time periods. This method also prints a messa$ standard output; this is picked up by the EJB server and logged. In this w$ can demonstrate that the method is actually being executed on the server, rather than the client. */ public double calculateCompoundInterest(double principle, double rate, double periods) { System.out.println("Someone called `calculateCompoundInterest!'"); return principle * Math.pow(1+rate, periods) - principle; } On Thu, 16 Jan 2003, Shainal Gosai wrote: > Hi, > > My main class has the following code : > > >---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > package org.jboss.docs.interest; > > import java.rmi.RemoteException; > import javax.ejb.SessionBean; > import javax.ejb.SessionContext; > > /** > This class contains the implementation for the `calculateCompoundInterest' > method exposed by this Bean. It includes empty method bodies for the methods > prescribe by the SessionBean interface; these don't need to do anything in this > simple example. > */ > public class InterestBean implements SessionBean > { > /** > Calulates the compound interest on the sum `principle', with interest rate per > period `rate' over `periods' time periods. This method also prints a message to > standard output; this is picked up by the EJB server and logged. In this way we > can demonstrate that the method is actually being executed on the server, > rather than the client. > */ > public double calculateCompoundInterest(double principle, > double rate, double periods) > { > System.out.println("Someone called `calculateCompoundInterest!'"); > return principle * Math.pow(1+rate, periods) - principle; > } > > /** Empty method body > */ > public void ejbCreate() > {} > /** Every ejbCreate() method ALWAYS needs a corresponding > ejbPostCreate() method with exactly the same parameter types. > */ > public void ejbPostCreate() > {} > /** Empty method body > */ > public void ejbRemove() > {} > /** Empty method body > */ > public void ejbActivate() > {} > /** Empty method body > */ > public void ejbPassivate() > {} > /** Empty method body > */ > public void setSessionContext(SessionContext sc) > {} > } > > >---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Now when I run the ejbDoclet task using ant, I get the following remote interface >generated : > > /* > * Generated by XDoclet - Do not edit! > */ > package org.jboss.docs.interest; > > /** > * Remote interface for Interest. > * @xdoclet-generated at 16-01-03 > * @copyright The XDoclet Team > * @author Doclet > * @version${version} > */ > public interface Interest > extends javax.ejb.EJBObject > { > > > } > > > This is devoid of the method that the actual class exposes, namely : > > public double calculateCompoundInterest(double principle, > double rate, double periods) throws RemoteException; > > > Is there a way to generate the methods that the main/actual class exposes in the >remote interface as well ? > > Note : I am using ant ver. 1.5.1 and xdoclet 1.2.0 > > Thanks in advance. > > Shainal Gosai > > > > > Click here to visit the Global Technology website > www.glotec.com > http://196.38.202.106/RocketSeed/mail/433a313a34313832323a323631393a2d323a3134 > > _______________ > Global Technology > www.glotec.co.za > > Disclaimer: This message contains confidential information for the addressee named >above. > If you are not the intended recipient of this message, you are hereby notified that >you must not > disseminate, copy or take any action in reliance on it. Any views expressed in this >message are > those of the individual sender unless otherwise stated. > -- ------------------------------------------------------- This SF.NET email is sponsored by: Thawte.com Understand how to protect your customers personal information by implementing SSL on your Apache Web Server. Click here to get our FREE Thawte Apache Guide: http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0029en _______________________________________________ Xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
