views:

603

answers:

2

Recently I have needed to use RMI, and I know enough for what I need to do, but one thing is intriguing me as I revisit this topic. Is it possible to make asynchronous RMI calls to the same service on the server?

Let's say I have n threads on the client and a single server-side object--call it S. S has a single method that I want to call from my client-side threads, but I don't want it to block as it has no shared resource to worry about.

Any ideas? Or is this something that is just better left to other methods?

+2  A: 

There should be no issues with doing this. It is the equivalent of multiple clients calling the same service at the same time from the service's perspective.

Any server side object should be written to be safe for concurrent access.

Robin
yeah i just coded it up and it worked well. thanks.
geowa4
+1  A: 

Probably you should work with something like JMS queue for asynchronic calls on an J2EE architecture. It works perfectly in these cases.

rfders