/* JFox, the OpenSource J2EE Application Server
 *
 * Copyright (C) 2002 huihoo.com
 * Distributable under GNU LGPL license
 * See the GNU Lesser General Public License for more details.
 */

package org.jfox.ejb.examples.stateful;

import java.rmi.RemoteException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import javax.ejb.EJBException;

/**
 * 
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class WorldBean implements SessionBean {

  private String word = "Hello,World";

  public WorldBean() {
  }

  public String getWord() throws RemoteException {
    return word;
  }

  public void setWord(String word) throws RemoteException {
    this.word = word;
  }

  public void setSessionContext(SessionContext sessionContext) throws EJBException, RemoteException {

  }

  public void ejbCreate() throws EJBException, RemoteException {

  }

  public void ejbCreate(String word) throws EJBException, RemoteException {
    this.word = word;
  }

  public void ejbRemove() throws EJBException, RemoteException {
    System.out.println(this.getClass().getName() + ".ejbRemove");
  }

  public void ejbActivate() throws EJBException, RemoteException {
    System.out.println(this.getClass().getName() + ".ejbActivate");
  }

  public void ejbPassivate() throws EJBException, RemoteException {
    System.out.println(this.getClass().getName() + ".ejbPassivate");
  }

  public static void main(String[] args) {

  }
}