ejb compile error, please help
Does anybody knows why i got following error, I copy from word to word from book but I am keep getting same error message over an over
please help
thx in advance
DiceEJB.java [17:1] class DiceEJB must be declared abstract. It does not define public abstract void ejbPassivate() throws javax.ejb.EJBException,java.rmi.RemoteException from class javax.ejb.SessionBean
public class DiceEJB implements SessionBean, Serializable {
^
1 error
[code]
import java.lang.Object;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import java.rmi.RemoteException;
import java.lang.Math;
import java.util.Random;
import java.io.*;
/**
* Title:
* Description:
* Copyright:Copyright (c) 2001
* Company:
* @author
* @version 1.0
*/
public class DiceEJB implements SessionBean, Serializable {
public int[] Roll() {
Random rng = new Random();
int diceArray = new int[5];
for(int i =0; i < diceArray.lenght;i++){
diceArray[i] =(Math.abs(rng.nextInt()) % 6) +1;
}
return diceArray;
}
public DiceEJB(){}
public void ejbCreate() {}
public void ejbRemove() {}
public void ejbActivate() {}
public void setSessionContext(SessionContext sc) {}
private void writeObject(ObjectOutputStream oos) throws IOException {
oos.defaultWriteObject();
}
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
ois.defaultReadObject();
}
}
[code]

