Click here to visit the Global Technology website
www.glotec.com

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

______________________________________________________
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.

Reply via email to