1 22 package org.jboss.proxy.ejb; 23 24 import java.io.Serializable ; 25 import javax.ejb.EJBMetaData ; 26 import javax.ejb.EJBHome ; 27 28 38 public class EJBMetaDataImplIIOP implements EJBMetaData , Serializable 39 { 40 private final Class remoteClass; 42 43 private final Class homeClass; 44 45 private final Class pkClass; 46 47 private final boolean session; 48 49 private final boolean statelessSession; 50 51 private final EJBHome home; 52 53 57 public EJBMetaDataImplIIOP(Class remoteClass, Class homeClass, Class pkClass, boolean session, 58 boolean statelessSession, EJBHome home) 59 { 60 this.remoteClass = remoteClass; 61 this.homeClass = homeClass; 62 this.pkClass = pkClass; 63 this.session = session; 64 this.statelessSession = statelessSession; 65 this.home = home; 66 } 67 68 72 public EJBHome getEJBHome() 73 { 74 return home; 75 } 76 77 81 public Class getHomeInterfaceClass() 82 { 83 return homeClass; 84 } 85 86 90 public Class getRemoteInterfaceClass() 91 { 92 return remoteClass; 93 } 94 95 99 public Class getPrimaryKeyClass() 100 { 101 if (session == true) 102 throw new RuntimeException ("A session bean does not have a primary key class"); 103 return pkClass; 104 } 105 106 111 public boolean isSession() 112 { 113 return session; 114 } 115 116 121 public boolean isStatelessSession() 122 { 123 return statelessSession; 124 } 125 } | Popular Tags |