jmesnil / jmx4r
- Source
- Commits
- Network (3)
- Issues (1)
- Downloads (6)
- Wiki (1)
- Graphs
-
Tree:
3a5dbfa
jmx4r / README.rdoc
| cc5eafd1 » | jmesnil | 2008-12-03 | 1 | jmx4r[http://github.com/jmesnil/jmx4r/] is a JMX library for JRuby. | |
| 2 | |||||
| 3 | It can be used to write simple Ruby scripts running on JRuby[http://jruby.org] | ||||
| 4 | to manage remote Java applications (e.g. JBoss[http://www.jboss.org], | ||||
| 5 | Tomcat[http://tomcat.apache.org/]) using | ||||
| 6 | JMX[http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/]. | ||||
| 7 | |||||
| 90456817 » | jmesnil | 2008-12-16 | 8 | jmx4r helps to manage Java applications using JMX in a simple and powerful way: | |
| 9 | * no need to depend on the Java interfaces of the MBean in your management code. This means <em>less deployment issues</em> | ||||
| 10 | * Thanks to Ruby metaprogramming toolset, you can <em>treat your MBeans as simple objects</em> and jmx4r hides all the complexity to map them to the javax.management API for you | ||||
| 11 | * you can manage your own JVM (e.g. if you're running a Rails on JRuby application) or a remote JVM in the same way | ||||
| 12 | |||||
| 13 | == Installation | ||||
| cc5eafd1 » | jmesnil | 2008-12-03 | 14 | ||
| 15 | jruby -S gem install jmx4r | ||||
| 16 | |||||
| 90456817 » | jmesnil | 2008-12-16 | 17 | == Usage | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 18 | ||
| 19 | # To trigger a garbage collection on a Java application: | ||||
| 20 | |||||
| 21 | require 'rubygems' | ||||
| 22 | require 'jmx4r' | ||||
| 23 | |||||
| 24 | JMX::MBean.establish_connection :host => "localhost", :port => 3000 | ||||
| 25 | |||||
| 26 | memory = JMX::MBean.find_by_name "java.lang:type=Memory" | ||||
| 27 | # display verbose GC logs | ||||
| 28 | memory.verbose = true | ||||
| 29 | # trigger a Garbage Collection | ||||
| 30 | memory.gc | ||||
| 31 | |||||
| 90456817 » | jmesnil | 2008-12-16 | 32 | == Help | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 33 | ||
| 6855d385 » | jmesnil | 2008-12-28 | 34 | * Wiki[http://jmesnil.net/wiki/Jmx4r] | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 35 | * RDoc[http://jmx4r.rubyforge.org/doc/] | |
| 36 | |||||
| 90456817 » | jmesnil | 2008-12-16 | 37 | == Source Code | |
| cc5eafd1 » | jmesnil | 2008-12-03 | 38 | ||
| 39 | git clone git://github.com/jmesnil/jmx4r.git | ||||
| 40 | |||||
| 41 | |||||
