geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ke...@apache.org
Subject svn commit: r568304 - /geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Date Tue, 21 Aug 2007 22:10:07 GMT
Author: kevan
Date: Tue Aug 21 15:10:04 2007
New Revision: 568304

URL: http://svn.apache.org/viewvc?rev=568304&view=rev
Log:
GERONIMO-2567 wrap ipv6 addresses with '[' ']'

Modified:
    geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java

Modified: geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java?rev=568304&r1=568303&r2=568304&view=diff
==============================================================================
--- geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
(original)
+++ geronimo/server/trunk/modules/geronimo-deploy-jsr88/src/main/java/org/apache/geronimo/deployment/plugin/factories/BaseDeploymentFactory.java
Tue Aug 21 15:10:04 2007
@@ -161,13 +161,18 @@
         environment.put(JMXConnector.CREDENTIALS, credentials);
         environment.put(JMXConnectorFactory.DEFAULT_CLASS_LOADER, BaseDeploymentFactory.class.getClassLoader());
         try {
+            // if ipv6 numeric address wrap with "[" "]"
+            String host = params.getHost();
+            if (host.indexOf(":") >= 0) {
+                host = "[" + host + "]";
+            }
             if (log.isDebugEnabled()) {
-                log.debug("Using JMXServiceURL with host=" + params.getHost() + ", port="
+ params.getPort());
+                log.debug("Using JMXServiceURL with host=" + host + ", port=" + params.getPort());
             }
-            JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+params.getHost()+":"+params.getPort()+"/JMXConnector");
+            JMXServiceURL address = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"+ host
+":"+params.getPort()+"/JMXConnector");
             JMXConnector jmxConnector = JMXConnectorFactory.connect(address, environment);
             RemoteDeploymentManager manager = getRemoteDeploymentManager();
-            manager.init(jmxConnector, params.getHost());
+            manager.init(jmxConnector, host);
             if(!manager.isSameMachine()) {
                 manager.setAuthentication(username, password);
             }



Mime
View raw message