clarencen/lshift — Issue #286: RPC stubs could be more defensive
Author: clarencen
Created: 2011-11-14 22:42:23+00:00
State: open

Whilst some may say "let it crash" is a valid exception strategy, I think that the RPC stubs inside the agent could be a little more intelligent than just polluting the whole log file with this:

@@@
2011-02-04 18:14:03,301 INFO Started actor for key: pair1
2011-02-04 18:14:03,403 ERROR Exception when invoking
actor [Actor[pair1:1296910352121]]
with message [DifferenceMessage(net.lshift.diffa.kernel.differencing.DefaultSessionManager@25e01f19)]
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused
at com.sun.jersey.client.urlconnection.URLConnectionClientHandler.handle(URLConnectionClientHandler.java:131) [jersey-client-1.4-ea06.jar:1.4-ea06]
at com.sun.jersey.api.client.Client.handle(Client.java:572) [jersey-client-1.4-ea06.jar:1.4-ea06]
at com.sun.jersey.api.client.WebResource.handle(WebResource.java:559) [jersey-client-1.4-ea06.jar:1.4-ea06]
at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:72) [jersey-client-1.4-ea06.jar:1.4-ea06]
at com.sun.jersey.api.client.WebResource$Builder.post(WebResource.java:502) [jersey-client-1.4-ea06.jar:1.4-ea06]
at net.lshift.diffa.messaging.json.AbstractRestClient.executeRpc(AbstractRestClient.scala:58) [diffa-json-messaging-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.messaging.json.ParticipantRestClient.queryAggregateDigests(ParticipantRestClient.scala:38) [diffa-json-messaging-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.differencing.BaseSynchingVersionPolicy$SyncStrategy.syncHalf(BaseSynchingVersionPolicy.scala:94) [diffa-kernel-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.differencing.SameVersionPolicy.synchroniseParticipants(SameVersionPolicy.scala:38) [diffa-kernel-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.differencing.BaseSynchingVersionPolicy.difference(BaseSynchingVersionPolicy.scala:75) [diffa-kernel-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.actors.PairActor$$anonfun$receive$1.apply(PairActor.scala:41) [diffa-kernel-0.9.3-SNAPSHOT.jar:na]
at net.lshift.diffa.kernel.actors.PairActor$$anonfun$receive$1.apply(PairActor.scala:38) [diffa-kernel-0.9.3-SNAPSHOT.jar:na]

@@@