Java RMI and Thread Synchronization questions

前端 未结 4 1498
鱼传尺愫
鱼传尺愫 2020-12-14 04:45

I actually have two questions about Java RMI and thread synchronization:

1) If I implement my RMI remote methods as synchronized, are they guaranteed to be mutually

4条回答
  •  眼角桃花
    2020-12-14 05:25

    To clarify all this confusion:

    1. If you synchronize your remote method implementations only one client can be executing at a time.

    2. If you synchronize your cleaner task on the remote object it joins (1).

    3. You can't define remote methods as static.

提交回复
热议问题