应用服务器-JBoss技术支持文档(二)(二)

2014-11-23 22:58:53 · 作者: · 浏览: 1
r, 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) {}

}

  注意大部分方法是空的。因为这些方法在SessionBean接口中说明,所以必须在InterestBean中存在,但在这个简单例子中,不需要具体内容。