|
From: Oliver H. <Ol...@ou...> - 2004-08-16 04:40:01
|
Andy, J=FCrgen,
I've been away for the last week so sorry for the late reply.
Attached are some files that add retry support to all the standard =
Spring remoting methods. The support is not as complete as my own =
remoting implementation but for most cases should work fine. There's =
also some code to allow metadata to be attached to RemoteInvocations (I =
think this stuff only works for the RMI and HTTP remoting).=20
J=FCrgen would you consider adding this code? The retry support could =
integrated higher up the class hierarchy perhaps as a subclass of =
RemoteAccessor?
Following is an example config.
Client:
<bean id=3D"theManager" =
class=3D"org.springframework.remoting.support.RertyingClientProxyFactoryB=
ean">
<property name=3D"wrapedRemoteAccessor"><ref =
local=3D"theManagerTarget" /></property>
<property name=3D"retryDecisionManager"><ref =
local=3D"retryDecisionManager" /></property> =20
</bean>
<bean id=3D"theManagerTarget" =
class=3D"org.springframework.remoting.httpinvoker.HttpInvokerClientInterc=
eptor">
<property =
name=3D"serviceInterface"><value>ourcommunity.TheManager</value></propert=
y>
<property =
name=3D"serviceUrl"><value>https://${oc.server.addr}/ra/theManager</value=
></property>
<property name=3D"remoteInvocationFactory"><ref =
local=3D"remoteInvocationFactory" /></property>
</bean>
=20
<bean id=3D"remoteInvocationFactory" =
class=3D"ourcommunity.admin.util.remoting.SecurityRemoteInvocationFactory=
" />
<bean id=3D"retryDecisionManager" =
class=3D"ourcommunity.admin.util.remoting.OCRetryDecisionManager" />=20
Server:
<bean id=3D"remoteInvocationExecutor" =
class=3D"ourcommunity.util.remoting.SecureRemoteInvocationExecutor" />
=20
<bean name=3D"/ra/theManager" =
class=3D"org.springframework.remoting.httpinvoker.HttpInvokerServiceExpor=
ter">
<property =
name=3D"serviceInterface"><value>ourcommunity.TheManager</value></propert=
y>
<property name=3D"service"><bean =
class=3D"ourcommunity.TheManagerImpl" /></property> =09
<property name=3D"remoteInvocationExecutor"><ref =
bean=3D"remoteInvocationExecutor" /></property>
</bean>
|