<commit_before>jmx4r[http://github.com/jmesnil/jmx4r/] is a JMX library for JRuby.

It can be used to write simple Ruby scripts running on JRuby[http://jruby.org]
to manage remote Java applications (e.g. JBoss[http://www.jboss.org],
Tomcat[http://tomcat.apache.org/]) using 
JMX[http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/].

== Install

  jruby -S gem install jmx4r

== Use

  # To trigger a garbage collection on a Java application:
  
  require 'rubygems'
  require 'jmx4r'
  
  JMX::MBean.establish_connection :host => "localhost", :port => 3000
  
  memory = JMX::MBean.find_by_name "java.lang:type=Memory"
  # display verbose GC logs
  memory.verbose = true
  # trigger a Garbage Collection
  memory.gc

== Learn

* Wiki[http://github.com/jmesnil/jmx4r/wikis]
* RDoc[http://jmx4r.rubyforge.org/doc/]
 
== Contribute

  git clone git://github.com/jmesnil/jmx4r.git


<commit_msg>added blurb about how jmx4r helps to manage Java/JRuby applications<commit_after>jmx4r[http://github.com/jmesnil/jmx4r/] is a JMX library for JRuby.

It can be used to write simple Ruby scripts running on JRuby[http://jruby.org]
to manage remote Java applications (e.g. JBoss[http://www.jboss.org],
Tomcat[http://tomcat.apache.org/]) using 
JMX[http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/].

jmx4r helps to manage Java applications using JMX in a simple and powerful way:
* no need to depend on the Java interfaces of the MBean in your management code. This means <em>less deployment issues</em>
* 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
* 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

== Installation

  jruby -S gem install jmx4r

== Usage

  # To trigger a garbage collection on a Java application:
  
  require 'rubygems'
  require 'jmx4r'
  
  JMX::MBean.establish_connection :host => "localhost", :port => 3000
  
  memory = JMX::MBean.find_by_name "java.lang:type=Memory"
  # display verbose GC logs
  memory.verbose = true
  # trigger a Garbage Collection
  memory.gc

== Help

* Wiki[http://github.com/jmesnil/jmx4r/wikis]
* RDoc[http://jmx4r.rubyforge.org/doc/]
 
== Source Code

  git clone git://github.com/jmesnil/jmx4r.git



{'fraction_non_alphanumeric': 0.11209068010075567, 'fraction_numerical': 0.010495382031905962, 'mean_word_length': 3.91340206185567, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4061322', 'n_tokens_mistral': 872, 'n_tokens_neox': 815, 'n_words': 245}