public void setMethodConcurrencyAttribute(final Method method, final LockType concurrencyAttribute) { getMethodContext(method).setLockType(concurrencyAttribute); }
public Duration getAccessTimeout(final Method beanMethod) { return getMethodContext(beanMethod).getAccessTimeout(); }
public ProxyInfo(final BeanContext beanContext, final Object primaryKey, final List<Class> interfaces, final InterfaceType proxyType, final Class mainInterface) { this.beanContext = beanContext; this.primaryKey = primaryKey; this.proxyInterfaces = interfaces; this.interfaceType = proxyType; this.beanContainer = (RpcContainer) beanContext.getContainer(); this.mainInterface = mainInterface; }
private String computeGlobalName(final BeanContext cdi, final Class<?> intrface) { final ModuleContext module = cdi.getModuleContext(); final AppContext application = module.getAppContext(); final String appName = application.isStandaloneModule() ? "" : application.getId() + "/"; final String moduleName = cdi.getModuleName() + "/"; String beanName = cdi.getEjbName(); if (intrface != null) { beanName = beanName + "!" + intrface.getName(); } return "global/" + appName + moduleName + beanName; }
public WebBeansContext getWebBeansContext() { final CdiEjbBean<?> bean = get(CdiEjbBean.class); if (bean != null) { return bean.getWebBeansContext(); } return moduleContext.getAppContext().getWebBeansContext(); }
@Override public int compare(final BeanContext a, final BeanContext b) { final int aa = a.getComponentType() == BeanType.SINGLETON ? 1 : 0; final int bb = b.getComponentType() == BeanType.SINGLETON ? 1 : 0; return aa - bb; } });
@Override public ClassLoader getNewTempClassLoader(final ClassLoader classLoader) { return ClassLoaderUtil.createTempClassLoader(classLoader); } }
private static String componentType(final BeanType componentType) { if (componentType == null) { return "unknown"; } return componentType.name(); }
private Duration getAccessTimeout(final BeanContext beanContext, Method callMethod) { callMethod = beanContext.getMatchingBeanMethod(callMethod); Duration accessTimeout = beanContext.getAccessTimeout(callMethod); if (accessTimeout == null) { accessTimeout = beanContext.getAccessTimeout(); if (accessTimeout == null) { accessTimeout = this.accessTimeout; } } return accessTimeout; }
private TransactionManager transactionManager() { if (transactionManager == null) { transactionManager = OpenEJB.getTransactionManager(); } return transactionManager; }
public T createInstance() throws OpenEJBException { if (instance == null) { construct(); } return instance; }
private LegacyView getLegacyView() { if (legacyView == null) { legacyView = new LegacyView(); } return legacyView; }
private Mdb getMdb() { if (mdb == null) { mdb = new Mdb(); } return mdb; }
private Stateful getStateful() { if (stateful == null) { stateful = new Stateful(); } return stateful; }
private Cmp getCmp() { if (cmp == null) { cmp = new Cmp(); } return cmp; }
/** * TODO: Move to MethodContext */ public void setMethodTransactionAttribute(final Method method, final TransactionType transactionType) throws OpenEJBException { setMethodTransactionAttribute(method, transactionType, null); }
public WebBeansContext getWebBeansContext() { final CdiEjbBean<?> bean = get(CdiEjbBean.class); if (bean != null) { return bean.getWebBeansContext(); } return moduleContext.getAppContext().getWebBeansContext(); }
private Duration getAccessTimeout(final BeanContext beanContext, Method callMethod) { callMethod = beanContext.getMatchingBeanMethod(callMethod); Duration accessTimeout = beanContext.getAccessTimeout(callMethod); if (accessTimeout == null) { accessTimeout = beanContext.getAccessTimeout(); if (accessTimeout == null) { accessTimeout = this.accessTimeout; } } return accessTimeout; }
private TransactionManager transactionManager() { if (transactionManager == null) { transactionManager = org.apache.openejb.OpenEJB.getTransactionManager(); } return transactionManager; }
private LegacyView getLegacyView() { if (legacyView == null) { legacyView = new LegacyView(); } return legacyView; }