import java.util.Random; import javax.ejb.SessionBean; import javax.ejb.SessionContext; public class RockPaperScissorsBean implements SessionBean { Random random; //All methods in the Remote interface must be implemented here: public String getRockPaperOrScissors() { if (random == null) {random = new Random();} int randomInt = random.nextInt(3); if (randomInt == 0) {return "Rock";} else if (randomInt == 1) {return "Paper";} else {return "Scissors";} } public void RockPaperScissorsBean() {} //the following five methods must be in the Enterprise Bean Class: public void ejbCreate() {} //ejbCreate() must match Home Interface's create() method signature public void ejbRemove() {} public void ejbActivate() {} public void ejbPassivate() {} public void setSessionContext(SessionContext sessionContext) {} }