From 23de152d5ce528a0bec277441cab35d9cafea6df Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 03 Oct 2013 18:00:04 +0000
Subject: [PATCH] Fix OPENDJ-1161 - Allow configuration of RMI port in JMX connector. These changes are adding a new optional configuration parameter : rmi-port, to allow specifying a fixed port for the RMI connection underlying JMX. This is required when managing applications need to connect to OpenDJ through a firewall. CR-2429.

---
 opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java b/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
index 3858b65..f296fb5 100644
--- a/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
+++ b/opends/src/server/org/opends/server/protocols/jmx/RmiConnector.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2009 Sun Microsystems, Inc.
+ *      Portions Copyright 2013 ForgeRock AS.
  */
 package org.opends.server.protocols.jmx;
 
@@ -127,7 +128,7 @@
   private OpendsRmiServerSocketFactory rmiSsf;
 
   /**
-   * The RMI protocol verison used by this connector.
+   * The RMI protocol version used by this connector.
    */
   private String rmiVersion;
 
@@ -271,7 +272,7 @@
 
   /**
    * Starts a secure RMI connector, with a client that doesn't have to
-   * present a certificate, on the local mbean server.
+   * present a certificate, on the local MBean server.
    * This method assumes that the common registry was successfully
    * started.
    * <p>
@@ -386,8 +387,8 @@
         TRACER.debugVerbose("Create and start the JMX RMI connector");
       }
       OpendsRMIJRMPServerImpl opendsRmiConnectorServer =
-          new OpendsRMIJRMPServerImpl(
-              0, rmiClientSockeyFactory, rmiServerSockeyFactory, env);
+          new OpendsRMIJRMPServerImpl(jmxConnectionHandler.getRmiPort(),
+              rmiClientSockeyFactory, rmiServerSockeyFactory, env);
       jmxRmiConnectorNoClientCertificate = new RMIConnectorServer(url, env,
           opendsRmiConnectorServer, mbs);
       jmxRmiConnectorNoClientCertificate.start();

--
Gitblit v1.10.0