@Override public boolean isStatefulBean(final Class<?> clazz) { return BeanType.STATEFUL.equals(beans.get(clazz).getComponentType()); }
private static String componentType(final BeanType componentType) { if (componentType == null) { return "unknown"; } return componentType.name(); }
public Class getPrimaryKeyClass() { if (type.isEntity()) return keyClass; else throw new UnsupportedOperationException("Session objects are private resources and do not have primary keys"); }
public boolean isCdiCompatible() { return isSession() || isMessageDriven(); }
if (ejbType.isEntity() && ((EntityBeanInfo) bean).primKeyClass != null) { String className = ((EntityBeanInfo) bean).primKeyClass; primaryKey = loadClass(className, "classNotFound.primaryKey"); if (ejbType.isSession() || ejbType.isMessageDriven()) { deployment.setBeanManagedTransaction("Bean".equalsIgnoreCase(bean.transactionType)); if (ejbType.isEntity()) { EntityBeanInfo entity = (EntityBeanInfo) bean;
if (beanContext.isLocalbean() && !beanContext.getComponentType().isMessageDriven() && !beanContext.isDynamicallyImplemented()) { final List<Class> interfaces = new ArrayList<Class>(3); interfaces.add(Serializable.class); interfaces.add(IntraVmProxy.class); final BeanType type = beanContext.getComponentType(); if (BeanType.STATEFUL.equals(type) || BeanType.MANAGED.equals(type)) { interfaces.add(BeanContext.Removable.class);
public boolean isSession() { return type.isSession(); }
if (componentType.isMessageDriven() && !isBeanManagedTransaction) { if (transactionType != TransactionType.NotSupported && transactionType != TransactionType.Required) {
public boolean isCdiCompatible() { return componentType.isCdiCompatible() && !Comp.class.equals(beanClass); }
if (ejbType.isEntity() && ((EntityBeanInfo) bean).primKeyClass != null) { final String className = ((EntityBeanInfo) bean).primKeyClass; primaryKey = loadClass(className, "classNotFound.primaryKey"); deployment = new BeanContext(bean.ejbDeploymentId, compJndiContext, moduleContext, ejbClass, home, remote, localhome, local, proxy, serviceEndpoint, businessLocals, businessRemotes, primaryKey, ejbType, bean.localbean && ejbType.isSession()); if (bean instanceof ManagedBeanInfo) { deployment.setHidden(((ManagedBeanInfo) bean).hidden); if (ejbType.isSession() || ejbType.isMessageDriven()) { deployment.setBeanManagedTransaction("Bean".equalsIgnoreCase(bean.transactionType)); if (ejbType.isSession()) { if (ejbType.isEntity()) { final EntityBeanInfo entity = (EntityBeanInfo) bean;
if (beanContext.isLocalbean() && !beanContext.getComponentType().isMessageDriven() && !beanContext.isDynamicallyImplemented()) { final List<Class> interfaces = new ArrayList<Class>(3); interfaces.add(Serializable.class); interfaces.add(IntraVmProxy.class); final BeanType type = beanContext.getComponentType(); if (BeanType.STATEFUL.equals(type) || BeanType.MANAGED.equals(type)) { interfaces.add(BeanContext.Removable.class);
public boolean isCdiCompatible() { return isSession() || isMessageDriven(); }
public boolean isSession() { return type.isSession(); }
public void initInternals() { final List<Class> classes = beanContext.getBusinessLocalInterfaces(); final boolean noLocalInterface = classes.isEmpty(); if (beanContext.getComponentType().isMessageDriven()) { homeLocalBean = null; home = null; remote = null; } else if (beanContext.isLocalbean() || (noLocalInterface && beanContext.getBusinessRemoteInterfaces().isEmpty() /*EJB2*/)) { homeLocalBean = beanContext.getBusinessLocalBeanHome(); home = null; remote = null; } else if (!noLocalInterface) { final Class<?> mainInterface = classes.get(0); final List<Class> interfaces = ProxyInterfaceResolver.getInterfaces(beanContext.getBeanClass(), mainInterface, classes); interfaces.addAll(beanContext.getBusinessRemoteInterfaces()); home = beanContext.getBusinessLocalHome(interfaces, mainInterface); homeLocalBean = null; remote = null; } else { final Class<?> mainInterface = beanContext.getBusinessRemoteInterface(); final List<Class> interfaces = ProxyInterfaceResolver.getInterfaces(beanContext.getBeanClass(), mainInterface, beanContext.getBusinessRemoteInterfaces()); remote = beanContext.getBusinessRemoteHome(interfaces, mainInterface); home = null; homeLocalBean = null; } }
public boolean isCdiCompatible() { return componentType.isCdiCompatible() && !Comp.class.equals(beanClass); }
@Override public boolean isStatefulBean(final Class<?> clazz) { return BeanType.STATEFUL.equals(beans.get(clazz).getComponentType()); }
if (ejbType.isEntity() && ((EntityBeanInfo) bean).primKeyClass != null) { final String className = ((EntityBeanInfo) bean).primKeyClass; primaryKey = loadClass(className, "classNotFound.primaryKey"); deployment = new BeanContext(bean.ejbDeploymentId, compJndiContext, moduleContext, ejbClass, home, remote, localhome, local, proxy, serviceEndpoint, businessLocals, businessRemotes, primaryKey, ejbType, bean.localbean && ejbType.isSession(), bean.passivable); if (bean instanceof ManagedBeanInfo) { deployment.setHidden(((ManagedBeanInfo) bean).hidden); if (ejbType.isSession() || ejbType.isMessageDriven()) { deployment.setBeanManagedTransaction("Bean".equalsIgnoreCase(bean.transactionType)); if (ejbType.isSession()) { if (ejbType.isEntity()) { final EntityBeanInfo entity = (EntityBeanInfo) bean;
private static String componentType(final BeanType componentType) { if (componentType == null) { return "unknown"; } return componentType.name(); }
public Class getPrimaryKeyClass() { if (type.isEntity()) { return keyClass; } else { throw new UnsupportedOperationException("Session objects are private resources and do not have primary keys"); } }
public boolean isSession() { return type.isSession(); }