No need to maintain the state of a bean between calls. //CalculatorBean.java@Statelesspublic class CalculatorBean implements CalculatorRemote, CalculatorLocal{ public int add(int x, int y) { return x + y; } public int subtract(int x, int y) { return x - y; }}//CalculatorRemote.javaimport javax.ejb.Remote;@Remotepublic interface CalculatorRemote extends Calculator{}//CalculatorLocal.java import javax.ejb.Local;@Localpublic interface CalculatorLocal extends Calculator{}//Client.javaimport tutorial.stateless.bean.Calculator;import tutorial.stateless.bean.CalculatorRemote;import javax.naming.InitialContext;public […]

Read more of this post