/** * Get the method transaction type * * @param methodName the method name * @param params the parameters * @param iface the interface type * @return the method transaction type */ public TransactionAttributeType getMethodTransactionType(String methodName, Class<?>[] params, MethodInterfaceType iface) { // default value TransactionAttributeType result = null; ContainerTransactionsMetaData containerTransactions = getContainerTransactions(); if (containerTransactions == null || containerTransactions.isEmpty()) return result; ContainerTransactionMetaData bestMatchTransaction = null; MethodMetaData bestMatch = null; for (ContainerTransactionMetaData transaction : containerTransactions) { MethodMetaData match = transaction.bestMatch(methodName, params, iface, bestMatch); if (match != bestMatch) { bestMatchTransaction = transaction; bestMatch = match; } } if (bestMatchTransaction != null) result = bestMatchTransaction.getTransAttribute(); return result; }
/** * Get the method transaction type * * @param methodName the method name * @param params the parameters * @param iface the interface type * @return the method transaction type */ public TransactionAttributeType getMethodTransactionType(String methodName, Class<?>[] params, MethodInterfaceType iface) { // default value TransactionAttributeType result = null; ContainerTransactionsMetaData containerTransactions = getContainerTransactions(); if (containerTransactions == null || containerTransactions.isEmpty()) return result; ContainerTransactionMetaData bestMatchTransaction = null; MethodMetaData bestMatch = null; for (ContainerTransactionMetaData transaction : containerTransactions) { MethodMetaData match = transaction.bestMatch(methodName, params, iface, bestMatch); if (match != bestMatch) { bestMatchTransaction = transaction; bestMatch = match; } } if (bestMatchTransaction != null) result = bestMatchTransaction.getTransAttribute(); return result; }