1 6 7 package org.jfox.ejb; 8 9 import java.lang.reflect.Method ; 10 import javax.ejb.EJBException ; 11 import javax.ejb.EJBHome ; 12 import javax.ejb.Handle ; 13 14 17 18 public class EJBHomeMethod { 19 public static final Method GetEJBMetaData; 20 public static final Method GetHomeHandle; 21 public static final Method RemoveByHandle; 22 public static final Method RemoveByPrimaryKey; 23 24 static { 25 try { 26 Class ejbHomeClass = EJBHome .class; 27 GetEJBMetaData = ejbHomeClass.getMethod("getEJBMetaData", new Class [0]); 28 GetHomeHandle = ejbHomeClass.getMethod("getHomeHandle", null); 29 RemoveByHandle = ejbHomeClass.getMethod("remove", new Class []{Handle .class}); 30 RemoveByPrimaryKey = ejbHomeClass.getMethod("remove", new Class []{Object .class}); 31 } 32 catch(Exception e) { 33 e.printStackTrace(); 34 throw new EJBException (e); 35 } 36 }; 37 38 public static void main(String [] args) { 39 40 } 41 } 42 | Popular Tags |