// SET THE DEFAULT
if (!hasMethodTransaction("*", null, methodTransactions)) {
for (Class<?> type : ancestors(clazz)) {
if (!hasMethodTransaction("*", type, methodTransactions)){
TransactionAttribute attribute = type.getAnnotation(TransactionAttribute.class);
if (attribute != null) {
ContainerTransaction ctx = new ContainerTransaction(cast(attribute.value()), type.getName(), ejbName, "*");
assemblyDescriptor.getContainerTransaction().add(ctx);
}
}
}
}
List<Method> methods = classFinder.findAnnotatedMethods(TransactionAttribute.class);
for (Method method : methods) {
TransactionAttribute attribute = method.getAnnotation(TransactionAttribute.class);
if (!methodTransactions.containsKey(method.getName())) {
// no method with this name in descriptor
addContainerTransaction(attribute, ejbName, method, assemblyDescriptor);
} else {
// method name already declared