1 25 26 package org.objectweb.jonas_ejb.svc; 27 28 import java.io.Serializable ; 29 30 import javax.ejb.EJBException ; 31 import javax.ejb.EJBHome ; 32 import javax.ejb.EJBMetaData ; 33 34 import java.util.logging.Level ; 35 import java.util.logging.Logger ; 36 37 38 43 public class JMetaData implements EJBMetaData , Serializable { 44 45 48 private static Logger logger = Logger.getLogger("org.objectweb.jonas_ejb.svc"); 49 50 53 private EJBHome home; 54 55 58 private Class homeClass; 59 60 63 private Class remoteClass; 64 65 68 private Class primaryKeyClass; 69 70 73 private boolean isSession; 74 75 78 private boolean isStatelessSession; 79 80 89 public JMetaData(EJBHome home, Class homeClass, Class remoteClass, boolean isSession, boolean isStatelessSession, Class primaryKeyClass) { 90 logger.log(Level.FINE, ""); 91 this.home = home; 92 this.homeClass = homeClass; 93 this.remoteClass = remoteClass; 94 this.isSession = isSession; 95 this.isStatelessSession = isStatelessSession; 96 this.primaryKeyClass = primaryKeyClass; 97 } 98 99 103 106 public EJBHome getEJBHome() { 107 return home; 108 } 109 110 113 public Class getHomeInterfaceClass() { 114 return homeClass; 115 } 116 117 120 public Class getPrimaryKeyClass() { 121 if (isSession) { 122 throw new EJBException ("getPrimaryKeyClass() not allowed for session"); 123 } 124 return primaryKeyClass; 125 } 126 127 130 public Class getRemoteInterfaceClass() { 131 return remoteClass; 132 } 133 134 137 public boolean isSession() { 138 return isSession; 139 } 140 141 144 public boolean isStatelessSession() { 145 return isStatelessSession; 146 } 147 148 } | Popular Tags |