mirror of
https://gitee.com/dromara/hmily.git
synced 2024-12-04 20:28:20 +08:00
parent
68949efcb2
commit
5ee6d2afb7
@ -67,6 +67,7 @@ public class HmilyTransactionFilter implements Filter {
|
||||
Class clazz = invoker.getInterface();
|
||||
Class[] args = invocation.getParameterTypes();
|
||||
final Object[] arguments = invocation.getArguments();
|
||||
converterParamsClass (args, arguments);
|
||||
Method method = null;
|
||||
Tcc tcc = null;
|
||||
try {
|
||||
@ -103,6 +104,24 @@ public class HmilyTransactionFilter implements Filter {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* params class converter
|
||||
*
|
||||
* @param args
|
||||
* @param arguments
|
||||
*/
|
||||
private void converterParamsClass(Class[] args, Object[] arguments) {
|
||||
if (arguments == null || arguments.length < 1) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < arguments.length; i++) {
|
||||
if (arguments == null) {
|
||||
continue;
|
||||
}
|
||||
args[i] = arguments[i].getClass ();
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Participant buildParticipant(final TccTransactionContext tccTransactionContext,
|
||||
final Tcc tcc,
|
||||
|
Loading…
Reference in New Issue
Block a user