/* JFox, the OpenSource J2EE Application Server
 *
 * Distributable under GNU LGPL license by gun.org
 * more details please visit http://www.huihoo.org/jfox
 */

package org.jfox.ejb;

import java.lang.reflect.Method;
import javax.ejb.EJBException;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;

/**
 * SessionBean 类的方法，用来实现对　session bean 得回调
 *
 * @author <a href="mailto:young_yy@hotmail.com">Young Yang</a>
 */

public class SessionBeanMethod {

    public static final Method EJBActivate;
    public static final Method EJBPassivate;
    public static final Method EJBRemove;
    public static final Method SetSessionContext;

    static {
        try {
            Class sessionBeanClass = SessionBean.class;
            EJBActivate = sessionBeanClass.getMethod("ejbActivate", null);
            EJBPassivate = sessionBeanClass.getMethod("ejbPassivate", null);
            EJBRemove = sessionBeanClass.getMethod("ejbRemove", null);
            SetSessionContext = sessionBeanClass.getMethod("setSessionContext", new Class[]{SessionContext.class});
        }
        catch(Exception e) {
            e.printStackTrace();
            throw new EJBException(e);
        }
    };

    public static void main(String[] args) {

    }
}
