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(); }
public void createAsynchronousMethodSet() { for (final Map.Entry<Method, MethodContext> entry : methodContextMap.entrySet()) { if (entry.getValue().isAsynchronous()) { asynchronousMethodSignatures.add(generateMethodSignature(entry.getKey())); } } for (final Class<?> cls : asynchronousClasses) { for (final Method method : cls.getDeclaredMethods()) { if (Modifier.isPublic(method.getModifiers())) { asynchronousMethodSignatures.add(generateMethodSignature(method)); } } } }
public void createAsynchronousMethodSet() { for (final Map.Entry<Method, MethodContext> entry : methodContextMap.entrySet()) { if (entry.getValue().isAsynchronous()) { asynchronousMethodSignatures.add(generateMethodSignature(entry.getKey())); } } for (final Class<?> cls : asynchronousClasses) { for (final Method method : cls.getDeclaredMethods()) { if (Modifier.isPublic(method.getModifiers())) { asynchronousMethodSignatures.add(generateMethodSignature(method)); } } } }
if (entry.getValue().isAsynchronous() && beanContext.getTransactionType(entry.getKey()) == TransactionType.RequiresNew) { beanContext.setMethodTransactionAttribute(entry.getKey(), TransactionType.Required);
if (entry.getValue().isAsynchronous() && beanContext.getTransactionType(entry.getKey()) == TransactionType.RequiresNew) { beanContext.setMethodTransactionAttribute(entry.getKey(), TransactionType.Required);