//Title:        jbg
//Version:
//Author:       Bill Burke
//Company:      JBG
//Description:  Your description

package org.jboss.test.retry.bean;

import java.rmi.*;
import javax.ejb.*;
import javax.naming.InitialContext;
import javax.naming.Context;
import org.jboss.test.retry.interfaces.RetryException;

public class RetrySessionBean implements SessionBean 
{
  private SessionContext sessionContext;

  public void ejbCreate() throws RemoteException, CreateException {
  }

  public void ejbActivate() throws RemoteException {
  }

  public void ejbPassivate() throws RemoteException {
  }

  public void ejbRemove() throws RemoteException {
  }

  public void setSessionContext(SessionContext context) throws RemoteException {
    sessionContext = context;
  }

   public void retry() throws RemoteException
   {
      System.out.println("**** in retry ****");
      if (RetryException.wasRetried) return;
      throw new RetryException();
   }
}
