diff --git a/hmily-tcc-dubbo/src/main/java/com/hmily/tcc/dubbo/filter/HmilyTransactionFilter.java b/hmily-tcc-dubbo/src/main/java/com/hmily/tcc/dubbo/filter/HmilyTransactionFilter.java index 9c46387f..2aeb9e0e 100644 --- a/hmily-tcc-dubbo/src/main/java/com/hmily/tcc/dubbo/filter/HmilyTransactionFilter.java +++ b/hmily-tcc-dubbo/src/main/java/com/hmily/tcc/dubbo/filter/HmilyTransactionFilter.java @@ -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,