package com.ejbhome.examples;

import java.rmi.RemoteException;
import javax.ejb.*;

public class CalcBean implements SessionBean {

  public int bonus;
  protected SessionContext ctx;

  public int calcBonus(int base, int perf, int company) throws RemoteException { 
    int calc = (base*perf*company);
    this.bonus += calc;
    return this.bonus; 
  }

  public void ejbCreate() throws CreateException, RemoteException {}

  // Other interface methods
  public void setSessionContext(javax.ejb.SessionContext ctx) throws RemoteException {
    this.ctx = ctx;
  }

  public void ejbRemove() throws RemoteException { }
  public void ejbActivate() throws RemoteException { }
  public void ejbPassivate() throws RemoteException { }
  public void ejbLoad() throws RemoteException { }
  public void ejbStore() throws RemoteException { }
}
