Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error handling for sync invocations in Java
05-12-2011, 04:26 PM
Post: #23
RE: Error handling for sync invocations in Java
(05-12-2011 09:08 AM)simonc Wrote:  Ah, you're correct. Assuming your control point and server are on different physical machines, unplugging the server won't result in any subnet changes being delivered to the control point. I'm surprised it results in any change at all for the control point. In which cases do the device added or removed callbacks you registered get called?

Yes, the control point and server are on different machines. I've traced the deviceAdded and deviceRemoved calls, as well as the addRef and removeRef calls from my application. There are two sequences, one failing and one working.

First, the failing sequence (on the control point):

1. deviceAdded callback invoked for server device
2. control point application calls addRef for server device
3. unplug server cable
4. replug server cable
5. control point application invokes a service on the server
6. ohNet returns ProxyError
7. control point application calls removeRef for server device
8. control point application refreshes the device list
9. deviceRemoved callback invoked for server device
10. control point application refreshes the device list again
(no further deviceAdded or deviceRemoved callbacks are made)

At this point, the control point has lost contact with the server, and any further refreshes of the device list have no effect.

Second, the working sequence (on the control point):

1. deviceAdded callback invoked for server device
2. control point application calls addRef for server device
3. unplug server cable
(don't replug the server cable yet)
4. control point application invokes a service on the server
5. ohNet returns ProxyError
6. control point application calls removeRef for server device
7. now replug the server cable
8. control point application refreshes the device list
9. deviceRemoved callback invoked for server device
10. control point application refreshes the device list
11. deviceAdded callback invoked for server device

At this point, the control point has regained contact with the server, and everything is working normally. The only difference from the failing sequence is that the control point application made a service invocation for the server while the server cable was unplugged.
Find all posts by this user


Messages In This Thread
RE: Error handling for sync invocations in Java - simoncn - 05-12-2011 04:26 PM

Forum Jump: