1 6 7 package org.jfox.ejb; 8 9 import java.lang.reflect.Method ; 10 import javax.ejb.EJBException ; 11 import javax.ejb.EJBObject ; 12 13 import org.jfox.ioc.util.Classes; 14 15 18 19 public class EJBObjectMethod { 20 public static final Method GetEJBHome; 21 public static final Method GetHandle; 22 public static final Method GetPrimaryKey; 23 public static final Method IsIdentical; 24 public static final Method Remove; 25 26 static { 27 try { 28 Class ejbObjectClass = EJBObject .class; 29 GetEJBHome = ejbObjectClass.getMethod("getEJBHome", Classes.EMPTY_CLASS_ARRAY); 30 GetHandle = ejbObjectClass.getMethod("getHandle", Classes.EMPTY_CLASS_ARRAY); 31 GetPrimaryKey = ejbObjectClass.getMethod("getPrimaryKey", Classes.EMPTY_CLASS_ARRAY); 32 IsIdentical = ejbObjectClass.getMethod("isIdentical", new Class []{EJBObject .class}); 33 Remove = ejbObjectClass.getMethod("remove", Classes.EMPTY_CLASS_ARRAY); 34 } 35 catch(Exception e) { 36 e.printStackTrace(); 37 throw new EJBException (e); 38 } 39 }; 40 41 public static void main(String [] args) { 42 43 } 44 } 45 | Popular Tags |