1 45 46 package org.openejb.alt.assembler.classic; 47 48 import org.openejb.DeploymentInfo; 49 50 53 public class EjbType { 54 public static final EjbType STATEFUL = new EjbType(DeploymentInfo.STATEFUL, "Stateful SessionBean"); 55 public static final EjbType STATELESS = new EjbType(DeploymentInfo.STATELESS, "Stateless SessionBean"); 56 public static final EjbType CMP_ENTITY = new EjbType(DeploymentInfo.CMP_ENTITY, "CMP EntityBean"); 57 public static final EjbType BMP_ENTITY = new EjbType(DeploymentInfo.BMP_ENTITY, "BMP EntityBean"); 58 59 private final boolean isSession; 60 private final boolean isEntity; 61 private final byte type; 62 private final String typeName; 63 64 private EjbType(byte type, String typeName) { 65 this.type = type; 66 this.typeName = typeName; 67 isSession = org.openejb.core.DeploymentInfo.STATEFUL == type || org.openejb.core.DeploymentInfo.STATELESS == type; 68 isEntity = !isSession; 69 } 70 71 public boolean isSession() { 72 return isSession; 73 } 74 75 public boolean isEntity() { 76 return isEntity; 77 } 78 79 public byte getType() { 80 return type; 81 } 82 83 public String getTypeName() { 84 return typeName; 85 } 86 } 87 | Popular Tags |