This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'lib/jar/getopt.jar' | |
require 'lib/jar/twiddle.jar' | |
java_import 'gnu.getopt.Getopt' | |
java_import 'java.lang.System' | |
java_import 'gnu.getopt.LongOpt' | |
java_import org.jboss.console.twiddle.Twiddle | |
java_import java.io.PrintWriter | |
args = "-s hostname -u admin -p admin set MBEAN_NAME ATTRIBUTE 25" | |
args = args.to_java(:string).split(" ").to_java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from the deployed directory WEB-INF | |
#`which java` -client -Xbootclasspath/a:lib/jruby-complete-1.6.2.jar -Djruby.shell=/bin/sh org.jruby.Main script/console production | |
java_import javax.management.Attribute | |
java_import javax.management.MBeanServerFactory | |
java_import javax.management.remote.JMXConnectorFactory | |
java_import javax.management.remote.JMXServiceURL | |
java_import javax.management.ObjectName | |
url = "service:jmx:rmi:///jndi/rmi://hostname:1111/jmxrmi" | |
url1 = JMXServiceURL.new(url) | |
url_path = "/jmxrmi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
require 'ojdbc-6.jar' | |
java_import "java.sql.Types" | |
java_import "oracle.jdbc.OracleTypes" | |
USER_ID = "12345" | |
WORKSPACE_ID = "222" | |
DOMAIN_ID = "X_1_1" | |