`StatelessCalculator.java`
`01 package trail.slsb; 02 03 import org.jboss.annotation.ejb.LocalBinding; 04 05 import javax.ejb.*; 06 07 @Stateless 08 // @LocalBinding (jndiBinding="EJB3Trail/slsb/Calculator") 09 public class StatelessCalculator implements Calculator { 10 11 public double calculate (int start, int end, double growthrate, double saving) { 12 double tmp = Math.pow(1. + growthrate / 12., 12. * (end - start) + 1); 13 return saving * 12. * (tmp - 1) / growthrate; 14 } 15 16 }`