This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes How to transfer objects across servers? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "How to transfer objects across servers?" Watch "How to transfer objects across servers?" New topic
Author

How to transfer objects across servers?

Gaurav Kr. Arora
Ranch Hand

Joined: Feb 20, 2011
Posts: 37
Hi,

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?

Please suggest.

Thanks.
Bojan Tomic
Greenhorn

Joined: Apr 08, 2008
Posts: 25
I don't completely understand what you're doing, but in order for two distinct JVMs (as I reckon you have) to operate on the same component, that component should be somehow exposed. Through an EJB, RESTful interface or anything really, as long both apps can see it and use it... You can't directly just share an object between JVMs.... well, you probably can, but that's hardly what you need here... I guess.
 
wood burning stoves
 
subject: How to transfer objects across servers?
 
Similar Threads
Java/J2EE to .NET (high-traffic) interoperability
Test 252: Mock exam
please answer this 128 questions for WLS. Urgently!
How to Create a new Windows Service
singleton java object in weblogic cluster