|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2002-2007 the original author or authors. |
|
|
|
* Copyright 2002-2009 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -352,6 +352,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing |
|
|
|
if (logger.isInfoEnabled()) { |
|
|
|
if (logger.isInfoEnabled()) { |
|
|
|
logger.info("Looking for RMI registry at port '" + registryPort + "', using custom socket factory"); |
|
|
|
logger.info("Looking for RMI registry at port '" + registryPort + "', using custom socket factory"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
synchronized (LocateRegistry.class) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// Retrieve existing registry.
|
|
|
|
// Retrieve existing registry.
|
|
|
|
Registry reg = LocateRegistry.getRegistry(null, registryPort, clientSocketFactory); |
|
|
|
Registry reg = LocateRegistry.getRegistry(null, registryPort, clientSocketFactory); |
|
|
|
@ -365,6 +366,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing |
|
|
|
return LocateRegistry.createRegistry(registryPort, clientSocketFactory, serverSocketFactory); |
|
|
|
return LocateRegistry.createRegistry(registryPort, clientSocketFactory, serverSocketFactory); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else { |
|
|
|
else { |
|
|
|
return getRegistry(registryPort); |
|
|
|
return getRegistry(registryPort); |
|
|
|
@ -385,6 +387,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing |
|
|
|
if (logger.isInfoEnabled()) { |
|
|
|
if (logger.isInfoEnabled()) { |
|
|
|
logger.info("Looking for RMI registry at port '" + registryPort + "'"); |
|
|
|
logger.info("Looking for RMI registry at port '" + registryPort + "'"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
synchronized (LocateRegistry.class) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// Retrieve existing registry.
|
|
|
|
// Retrieve existing registry.
|
|
|
|
Registry reg = LocateRegistry.getRegistry(registryPort); |
|
|
|
Registry reg = LocateRegistry.getRegistry(registryPort); |
|
|
|
@ -398,6 +401,7 @@ public class RmiServiceExporter extends RmiBasedExporter implements Initializing |
|
|
|
return LocateRegistry.createRegistry(registryPort); |
|
|
|
return LocateRegistry.createRegistry(registryPort); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Test the given RMI registry, calling some operation on it to |
|
|
|
* Test the given RMI registry, calling some operation on it to |
|
|
|
|