Greetings,

I have a problem and I really don't know what is going on. I have a very basic service exported via RMI. The client is a webapp deployed on Tomcat. Everything works fine until I decide to shut down the service layer. At this point, as expected, I get connection errors in the client. After I restart the service though, I keep getting
org.springframework.remoting.RemoteConnectFailureE xception: Could not connect to remote service [...] nested exception is java.rmi.ConnectException: Connection refused

If I reload the webapp in Tomcat's manager app, it works again, so it would appear to be a caching issue of some sort.

Here are the relevant XML deffinitions:
-client part:
<bean id="someBean" class="org.springframework.remoting.rmi.RmiProxyFa ctoryBean">
<property name="serviceUrl" value="rmi://127.0.0.1:6666/someApp"/>
<property name="serviceInterface" value="test.HelloInterface"/>
</bean>
-server part
<bean class="org.springframework.remoting.rmi.RmiService Exporter">
<property name="serviceName" value="someApp"/>
<property name="service" ref="helloBean"/>
<property name="serviceInterface" value="test.HelloInterface"/>
<property name="registryPort" value="6666"/>
</bean>

Am I missing something? Or is it expected behavior that if the server is restarted the client must also be restarted? It seems to me that when the bean is instantiated it acquires a connection and keeps trying to reuse the exact same connection through its entire lifetime.

Any hints would be much appreciated. Thanks.

Note: I use Spring Framework version 2.5.5 on both client and server (probably irrelevant)