if (bean.getTransactionType() == TransactionType.CONTAINER) {
Map<String, List<MethodTransaction>> methodTransactions = assemblyDescriptor.getMethodTransactions(ejbName);
// SET THE DEFAULT
if (!methodTransactions.containsKey("*")) {
TransactionAttribute attribute = clazz.getAnnotation(TransactionAttribute.class);
if (attribute != null) {
ContainerTransaction ctx = new ContainerTransaction(cast(attribute.value()), 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