public boolean isAsynchronous(final Method method) { final Method matchingBeanMethod = getMatchingBeanMethod(method); final Class<?> returnType = matchingBeanMethod.getReturnType(); if (returnType != void.class && returnType != Future.class) { return false; } if (asynchronousClasses.contains(matchingBeanMethod.getDeclaringClass())) { return true; } final MethodContext methodContext = methodContextMap.get(matchingBeanMethod); return methodContext != null && methodContext.isAsynchronous(); }
public boolean isAsynchronous(final Method method) { final Method matchingBeanMethod = getMatchingBeanMethod(method); final Class<?> returnType = matchingBeanMethod.getReturnType(); if (returnType != void.class && returnType != Future.class) { return false; } if (asynchronousClasses.contains(matchingBeanMethod.getDeclaringClass())) { return true; } final MethodContext methodContext = methodContextMap.get(matchingBeanMethod); return methodContext != null && methodContext.isAsynchronous(); }
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 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; }
protected Object homeMethod(final Method callMethod, final Object[] args, final ThreadContext callContext, final InterfaceType type) throws OpenEJBException { final BeanContext beanContext = callContext.getBeanContext(); callContext.setCurrentOperation(Operation.HOME); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); return invoke(type, callMethod, runMethod, args, callContext); }
protected Object homeMethod(final Method callMethod, final Object[] args, final ThreadContext callContext, final InterfaceType type) throws OpenEJBException { final BeanContext beanContext = callContext.getBeanContext(); callContext.setCurrentOperation(Operation.HOME); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); return invoke(type, callMethod, runMethod, args, callContext); }
protected Object findMethod(final Method callMethod, final Object[] args, final ThreadContext callContext, final InterfaceType type) throws OpenEJBException { final BeanContext beanContext = callContext.getBeanContext(); callContext.setCurrentOperation(Operation.FIND); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); Object returnValue = invoke(type, callMethod, runMethod, args, callContext); /* * Find operations return either a single primary key or a collection of primary keys. * The primary keys are converted to ProxyInfo objects. */ if (returnValue instanceof Collection) { final Iterator keys = ((Collection) returnValue).iterator(); final Vector<ProxyInfo> proxies = new Vector<ProxyInfo>(); while (keys.hasNext()) { final Object primaryKey = keys.next(); proxies.addElement(new ProxyInfo(beanContext, primaryKey)); } returnValue = proxies; } else if (returnValue instanceof Enumeration) { final Enumeration keys = (Enumeration) returnValue; final Vector<ProxyInfo> proxies = new Vector<ProxyInfo>(); while (keys.hasMoreElements()) { final Object primaryKey = keys.nextElement(); proxies.addElement(new ProxyInfo(beanContext, primaryKey)); } returnValue = new ArrayEnumeration(proxies); } else { returnValue = new ProxyInfo(beanContext, returnValue); } return returnValue; }
protected Object findMethod(final Method callMethod, final Object[] args, final ThreadContext callContext, final InterfaceType type) throws OpenEJBException { final BeanContext beanContext = callContext.getBeanContext(); callContext.setCurrentOperation(Operation.FIND); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); Object returnValue = invoke(type, callMethod, runMethod, args, callContext); /* * Find operations return either a single primary key or a collection of primary keys. * The primary keys are converted to ProxyInfo objects. */ if (returnValue instanceof Collection) { final Iterator keys = ((Collection) returnValue).iterator(); final Vector<ProxyInfo> proxies = new Vector<ProxyInfo>(); while (keys.hasNext()) { final Object primaryKey = keys.next(); proxies.addElement(new ProxyInfo(beanContext, primaryKey)); } returnValue = proxies; } else if (returnValue instanceof Enumeration) { final Enumeration keys = (Enumeration) returnValue; final Vector<ProxyInfo> proxies = new Vector<ProxyInfo>(); while (keys.hasMoreElements()) { final Object primaryKey = keys.nextElement(); proxies.addElement(new ProxyInfo(beanContext, primaryKey)); } returnValue = new ArrayEnumeration(proxies); } else { returnValue = new ProxyInfo(beanContext, returnValue); } return returnValue; }
final Method beanMethod = getMatchingBeanMethod(method); methodContext = getMethodContext(beanMethod);
final Method beanMethod = getMatchingBeanMethod(method); methodContext = getMethodContext(beanMethod);
callContext.setCurrentOperation(Operation.HOME); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod);
final Method targetMethod = deployInfo.getMatchingBeanMethod(method); callContext.set(Method.class, targetMethod);
callContext.setCurrentOperation(Operation.HOME); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod);
final Method targetMethod = deployInfo.getMatchingBeanMethod(method); callContext.set(Method.class, targetMethod);
final Method runMethod = beanContext.getMatchingBeanMethod(callMethod);
final Method runMethod = beanContext.getMatchingBeanMethod(callMethod);
final Method runMethod = beanContext.getMatchingBeanMethod(callMethod);
final Method ejbCreateMethod = beanContext.getMatchingBeanMethod(callMethod);
callContext.setCurrentAllowedStates(null); callContext.setInvokedInterface(callInterface); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); callContext.set(Method.class, runMethod);
callContext.setCurrentAllowedStates(null); callContext.setInvokedInterface(callInterface); final Method runMethod = beanContext.getMatchingBeanMethod(callMethod); callContext.set(Method.class, runMethod);