Skip to content

Commit

Permalink
Adding support of java.rmi.server.hostname system property
Browse files Browse the repository at this point in the history
  • Loading branch information
hasalex authored and bstansberry committed Dec 22, 2011
1 parent 26b1ad9 commit 555ad21
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions jmx/src/main/java/org/jboss/as/jmx/JMXConnectorService.java
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ public ServerSocket createServerSocket(int port) throws IOException {
}

private void setRmiServerProperty(final String address) {
// if the RMI server hostname is already set, don't change it
// So that AS 7 do support the -Djava.rmi.server.hostname system property
// Really useful behind a firewall, with NAT
if (System.getProperty(SERVER_HOSTNAME) != null) {
return ;
}

SecurityManager sm = System.getSecurityManager();
if(sm != null) {
AccessController.doPrivileged(new PrivilegedAction<Void>() {
Expand Down

0 comments on commit 555ad21

Please sign in to comment.