Author: msacks
Date: Thu Jun 30 16:35:41 2011
New Revision: 1141612

URL: http://svn.apache.org/viewvc?rev=1141612&view=rev
Log:
fixed problem with connection exception in Issue kitty-29 
https://issues.apache.org/jira/browse/KITTY-29?

Modified:
    incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy
    incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy

Modified: incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy
URL: 
http://svn.apache.org/viewvc/incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy?rev=1141612&r1=1141611&r2=1141612&view=diff
==============================================================================
--- incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy 
(original)
+++ incubator/kitty/trunk/src/main/java/org/apache/kitty/CmdShell.groovy Thu 
Jun 30 16:35:41 2011
@@ -237,8 +237,10 @@ class CmdShell {
        }
 
     static cmdConnect(String... args) {
+               
         def host = args.length > 1 ? args[0] : HOST
-        def port = args.length > 2 ? args[1] : PORT
+        def port = args.length >= 2 ? args[1] : PORT
+               
         if (args?.length == 4) {
             getClient().connect(host, port, args[2], args[3])
         }
@@ -367,7 +369,6 @@ class CmdShell {
                println "Setting the domain to $domain..."
                if (remote) {
                        getClient().setDomain(domain)
-                       println "The domain is set to $domain"
                }
                else {
                        println Constants.ERROR_NOT_CONNECTED

Modified: 
incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy
URL: 
http://svn.apache.org/viewvc/incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy?rev=1141612&r1=1141611&r2=1141612&view=diff
==============================================================================
--- incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy 
(original)
+++ incubator/kitty/trunk/src/main/java/org/apache/kitty/client/Client.groovy 
Thu Jun 30 16:35:41 2011
@@ -72,7 +72,7 @@ class Client {
                }
 
                try {
-                       serviceURL = 
"service:jmx:rmi:///jndi/rmi://$_host:$_port/jmxrmi"
+                       serviceURL = 
"service:jmx:rmi:///jndi/rmi://$_host:$_port/jmxrmi"                       
                        this.url = new JMXServiceURL(serviceURL)
                        
                        // TODO add auth & credentials to properties
@@ -142,6 +142,7 @@ class Client {
                                if (it.equals(_domain)) {
                                        this.domain = _domain
                                        this.mBeansPath = []
+                    println "The domain is set to $domain"
                                        return
                                }
                        }


Reply via email to