Adding lock/synchronization to make sure that RMI calls are thread safe
[iot2.git] / iotjava / iotrmi / Java / IoTRMICall.java
index 8bd86c9207eb90a544dc6a193db0641c796e6e4a..2ec265c5409edd171e65eca8809e94c832a45017 100644 (file)
@@ -48,7 +48,7 @@ public class IoTRMICall {
        /**
         * remoteCall() calls a method remotely by passing in parameters and getting a return Object
         */
-       public Object remoteCall(int objectId, String methodSign, Class<?> retType, Class<?> retGenTypeKey, 
+       public synchronized Object remoteCall(int objectId, String methodSign, Class<?> retType, Class<?> retGenTypeKey, 
                        Class<?> retGenTypeVal, Class<?>[] paramCls, Object[] paramObj) {
 
                // Send method info