Jul 27th, 2011, 03:39 AM
How to transfer object across servers?
Am using RMI Spring capablilites and new to this framework.
In my application there is a client which access a service running on server using RMI Spring. Now, if maximum no. of users to that service connect, connection refuse exception is thrown and I am catching it and then transferring the control to another server which runs a backup service and performs the same task.
The task is simple. We are adding user names to an arraylist.
Problem: Arraylist to which users are getting added is local to each of the server and when control transfers to new server after exception has occured, the users get added to the arraylist which was created at the new server.
How can the same arraylist object be shared across the servers/application, so when the exception occurs or doesn't occur, program continues to add usernames in the same arraylist?
Tags for this Thread