| Author |
creating more than a single RMI registry in the same VM is failing ?
|
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
An attempt to create more than a single registry in the
same VM isl failing.
createRegistry(portNumber) ;
getting
java.rmi.server.ExportException: internal error:
ObjID already in use
java version is 1.6.0_26
|
 |
Kathleen Angeles
Ranch Hand
Joined: Aug 06, 2012
Posts: 115
|
|
|
If you need more than 1, they should listen to different ports.
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
|
How to stop the existing running RMI registry and re-start the RMI registry with same port number ?
|
 |
Kathleen Angeles
Ranch Hand
Joined: Aug 06, 2012
Posts: 115
|
|
|
You can refer to official Java RMI API. That would most likely be just one-liner commands.
|
 |
Edward Harned
Ranch Hand
Joined: Sep 19, 2005
Posts: 290
|
|
|
Only one RMI Registry is permitted per machine. There is no programmable way to kill the Registry.
|
Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14568
|
|
Quote:
If you need more than 1, they should must listen to different ports.
(only one application can hold a specific listening port at a time. This is an OS/network limitation).
Quote:
Only one RMI Registry is permitted per machine. There is no programmable way to kill the Registry.
(Sure there is. If they're in separate JVMs, just terminate the offending JVM).
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Edward Harned
Ranch Hand
Joined: Sep 19, 2005
Posts: 290
|
|
|
OK I stand corrected. I never tried to use multiple Registries on different ports.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
We have multiple RMI registries running in production on a single computer here at work. Naturally they all run in separate JVMs and they all listen at different ports. And yes, we can terminate any of them at any time by killing the JVM in which they are running.
(... posted for people who weren't already entirely clear on how RMI registries work.)
|
 |
kri shan
Ranch Hand
Joined: Apr 08, 2004
Posts: 1303
|
|
we can terminate any of them at any time by killing the JVM in which they are running.
So only way to stop/kill the RMI registry is exit/killing the JVM. We are running bunch of TestNG test cases on the same JVM using same port. If i use different ports for different tests, i do not see any problem in the same JVM. Is there a way to stop the RMI registry programatically ?
|
 |
Tony Docherty
Bartender
Joined: Aug 07, 2007
Posts: 1223
|
|
If you have started the registry programmatically using:
then I believe you can stop it programmatically using:
|
 |
 |
|
|
subject: creating more than a single RMI registry in the same VM is failing ?
|
|
|