<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -75,199 +75,201 @@ module JMX
       MBeanAttributeInfo.new(name.to_s, to_java_type(type), description, is_reader, is_writer, is_iser)
     end
   end
-end
-
-# Creators of Ruby based MBeans must inherit this
-# class (&lt;tt&gt;DynamicMBean&lt;/tt&gt;) in their own bean classes and then register them with a JMX mbean server.
-#  Here is an example:
-#       class MyMBean &lt; DynamicMBean
-#         rw_attribute :status, :string, &quot;Status information for this process&quot;
-#
-#         operation &quot;Shutdown this process&quot;
-#         parameter :string, &quot;user_name&quot;, &quot;Name of user requesting shutdown&quot;
-#         returns :string
-#         def shutdown(user_name)
-#            &quot;shutdown requests more time&quot;
-#         end
-#       end
-# Once you have defined your bean class you can start declaring attributes and operations.
-# Attributes come in three flavors: read, write, and read write.  Simmilar to the &lt;tt&gt;attr*&lt;/tt&gt;
-# helpers, there are helpers that are used to create management attributes. Use +r_attribute+,
-# +w_attribute+, and +rw_attribute+ to declare attributes, and the +operation+, +returns+,
-# and +parameter+ helpers to define a management operation.
-# Creating attributes with the *_attribute convention ALSO creates ruby accessors
-# (it invokes the attr_accessor/attr_reader/attr_writer ruby helpers) to create ruby methods
-# like: user_name= and username.  So in your ruby code you can treat the attributes
-# as &quot;regular&quot; ruby accessors
-class DynamicMBean
-  import javax.management.MBeanOperationInfo
-  import javax.management.MBeanAttributeInfo
-  import javax.management.DynamicMBean
-  import javax.management.MBeanInfo
-  include JMX::JavaTypeAware
-
-  #NOTE this will not be needed when JRuby-3164 is fixed.
-  def self.inherited(cls)
-    cls.send(:include, DynamicMBean)
-  end
-
-  # TODO: preserve any original method_added?
-  # TODO: Error handling here when it all goes wrong?
-  def self.method_added(name) #:nodoc:
-    return if Thread.current[:op].nil?
-    Thread.current[:op].name = name
-    operations &lt;&lt; Thread.current[:op].to_jmx
-    Thread.current[:op] = nil
-  end
-
-  def self.attributes #:nodoc:
-    Thread.current[:attrs] ||= []
-  end
-
-  def self.operations #:nodoc:
-    Thread.current[:ops] ||= []
-  end
 
-  # the &lt;tt&gt;rw_attribute&lt;/tt&gt; method is used to declare a JMX read write attribute.
-  # see the +JavaSimpleTypes+ module for more information about acceptable types
-  # usage:
-  # rw_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
+  # Creators of Ruby based MBeans must inherit this
+  # class (&lt;tt&gt;DynamicMBean&lt;/tt&gt;) in their own bean classes and then register them with a JMX mbean server.
+  #  Here is an example:
+  #       class MyMBean &lt; DynamicMBean
+  #         rw_attribute :status, :string, &quot;Status information for this process&quot;
   #
-  # The name and type parameters are mandatory
-  # The description parameter is optional (defaults to the same value than the env: ruby: No such file or directory
-  # name parameter in that case)
-  # --
-  # methods used to create an attribute.  They are modeled on the attrib_accessor
-  # patterns of creating getters and setters in ruby
-  #++
-  def self.rw_attribute(name, type, description=nil)
-    description ||= name.to_s
-    attributes &lt;&lt; JMX::Attribute.new(name, type, description, true, true).to_jmx
-    attr_accessor name
-    #create a &quot;java&quot; oriented accessor method
-    define_method(&quot;jmx_get_#{name.to_s.downcase}&quot;) do
-      begin
-        #attempt conversion
-        java_type = to_java_type(type)
-        value = eval &quot;#{java_type}.new(@#{name.to_s})&quot;
-      rescue
-        #otherwise turn it into a java Object type for now.
-        value = eval &quot;Java.ruby_to_java(@#{name.to_s})&quot;
+  #         operation &quot;Shutdown this process&quot;
+  #         parameter :string, &quot;user_name&quot;, &quot;Name of user requesting shutdown&quot;
+  #         returns :string
+  #         def shutdown(user_name)
+  #            &quot;shutdown requests more time&quot;
+  #         end
+  #       end
+  # Once you have defined your bean class you can start declaring attributes and operations.
+  # Attributes come in three flavors: read, write, and read write.  Simmilar to the &lt;tt&gt;attr*&lt;/tt&gt;
+  # helpers, there are helpers that are used to create management attributes. Use +r_attribute+,
+  # +w_attribute+, and +rw_attribute+ to declare attributes, and the +operation+, +returns+,
+  # and +parameter+ helpers to define a management operation.
+  # Creating attributes with the *_attribute convention ALSO creates ruby accessors
+  # (it invokes the attr_accessor/attr_reader/attr_writer ruby helpers) to create ruby methods
+  # like: user_name= and username.  So in your ruby code you can treat the attributes
+  # as &quot;regular&quot; ruby accessors
+  class DynamicMBean
+    import javax.management.MBeanOperationInfo
+    import javax.management.MBeanAttributeInfo
+    import javax.management.DynamicMBean
+    import javax.management.MBeanInfo
+    include JMX::JavaTypeAware
+  
+    #NOTE this will not be needed when JRuby-3164 is fixed.
+    def self.inherited(cls)
+      cls.send(:include, DynamicMBean)
+    end
+  
+    # TODO: preserve any original method_added?
+    # TODO: Error handling here when it all goes wrong?
+    def self.method_added(name) #:nodoc:
+      return if Thread.current[:op].nil?
+      Thread.current[:op].name = name
+      operations &lt;&lt; Thread.current[:op].to_jmx
+      Thread.current[:op] = nil
+    end
+  
+    def self.attributes #:nodoc:
+      Thread.current[:attrs] ||= []
+    end
+  
+    def self.operations #:nodoc:
+      Thread.current[:ops] ||= []
+    end
+  
+    # the &lt;tt&gt;rw_attribute&lt;/tt&gt; method is used to declare a JMX read write attribute.
+    # see the +JavaSimpleTypes+ module for more information about acceptable types
+    # usage:
+    # rw_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
+    #
+    # The name and type parameters are mandatory
+    # The description parameter is optional (defaults to the same value than the env: ruby: No such file or directory
+    # name parameter in that case)
+    # --
+    # methods used to create an attribute.  They are modeled on the attrib_accessor
+    # patterns of creating getters and setters in ruby
+    #++
+    def self.rw_attribute(name, type, description=nil)
+      description ||= name.to_s
+      attributes &lt;&lt; JMX::Attribute.new(name, type, description, true, true).to_jmx
+      attr_accessor name
+      #create a &quot;java&quot; oriented accessor method
+      define_method(&quot;jmx_get_#{name.to_s.downcase}&quot;) do
+        begin
+          #attempt conversion
+          java_type = to_java_type(type)
+          value = eval &quot;#{java_type}.new(@#{name.to_s})&quot;
+        rescue
+          #otherwise turn it into a java Object type for now.
+          value = eval &quot;Java.ruby_to_java(@#{name.to_s})&quot;
+        end
+        attribute = javax.management.Attribute.new(name.to_s, value)
+      end
+  
+      define_method(&quot;jmx_set_#{name.to_s.downcase}&quot;) do |value|
+        blck = to_ruby(type)
+        send &quot;#{name.to_s}=&quot;, blck.call(value)
       end
-      attribute = javax.management.Attribute.new(name.to_s, value)
     end
-
-    define_method(&quot;jmx_set_#{name.to_s.downcase}&quot;) do |value|
-      blck = to_ruby(type)
-      send &quot;#{name.to_s}=&quot;, blck.call(value)
+  
+    # the &lt;tt&gt;r_attribute&lt;/tt&gt; method is used to declare a JMX read only attribute.
+    # see the +JavaSimpleTypes+ module for more information about acceptable types
+    # usage:
+    #  r_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
+    def self.r_attribute(name, type, description)
+      attributes &lt;&lt; JMX::Attribute.new(name, type, description, true, false).to_jmx
+      attr_reader name
+      #create a &quot;java&quot; oriented accessor method
+      define_method(&quot;jmx_get_#{name.to_s.downcase}&quot;) do
+        begin
+          #attempt conversion
+          java_type = to_java_type(type)
+          value = eval &quot;#{java_type}.new(@#{name.to_s})&quot;
+        rescue
+          #otherwise turn it into a java Object type for now.
+          value = eval &quot;Java.ruby_to_java(@#{name.to_s})&quot;
+        end
+        attribute = javax.management.Attribute.new(name.to_s, value)
+      end
     end
-  end
-
-  # the &lt;tt&gt;r_attribute&lt;/tt&gt; method is used to declare a JMX read only attribute.
-  # see the +JavaSimpleTypes+ module for more information about acceptable types
-  # usage:
-  #  r_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
-  def self.r_attribute(name, type, description)
-    attributes &lt;&lt; JMX::Attribute.new(name, type, description, true, false).to_jmx
-    attr_reader name
-    #create a &quot;java&quot; oriented accessor method
-    define_method(&quot;jmx_get_#{name.to_s.downcase}&quot;) do
-      begin
-        #attempt conversion
-        java_type = to_java_type(type)
-        value = eval &quot;#{java_type}.new(@#{name.to_s})&quot;
-      rescue
-        #otherwise turn it into a java Object type for now.
-        value = eval &quot;Java.ruby_to_java(@#{name.to_s})&quot;
+  
+    # the &lt;tt&gt;w_attribute&lt;/tt&gt; method is used to declare a JMX write only attribute.
+    # see the +JavaSimpleTypes+ module for more information about acceptable types
+    # usage:
+    #  w_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
+    def self.w_attribute(name, type, description)
+      attributes &lt;&lt; JMX::Attribute.new(name, type, description, false, true).to_jmx
+      attr_writer name
+      define_method(&quot;jmx_set_#{name.to_s.downcase}&quot;) do |value|
+        blck = to_ruby(type)
+        eval &quot;@#{name.to_s} = #{blck.call(value)}&quot;
       end
-      attribute = javax.management.Attribute.new(name.to_s, value)
     end
-  end
-
-  # the &lt;tt&gt;w_attribute&lt;/tt&gt; method is used to declare a JMX write only attribute.
-  # see the +JavaSimpleTypes+ module for more information about acceptable types
-  # usage:
-  #  w_attribute :attribute_name, :string, &quot;Description displayed in a JMX console&quot;
-  def self.w_attribute(name, type, description)
-    attributes &lt;&lt; JMX::Attribute.new(name, type, description, false, true).to_jmx
-    attr_writer name
-    define_method(&quot;jmx_set_#{name.to_s.downcase}&quot;) do |value|
-      blck = to_ruby(type)
-      eval &quot;@#{name.to_s} = #{blck.call(value)}&quot;
+  
+    # Use the operation method to declare the start of an operation
+    # It takes as an optional argument the description for the operation
+    # Example:
+    #     operation &quot;Used to start the service&quot;
+    #     def start
+    #     end
+    #--
+    # Last operation wins if more than one
+    #++
+    def self.operation(description=nil)
+      # Wait to error check until method_added so we can know method name
+      Thread.current[:op] = JMX::Operation.new description
     end
+  
+    # Used to declare a parameter (you can declare more than one in succession) that
+    # is associated with the currently declared operation.
+    # The type is mandatory, the name and description are optional.
+    # Example:
+    #     operation &quot;Used to update the name of a service&quot;
+    #     parameter :string, &quot;name&quot;, &quot;Set the new name of the service&quot;
+    #     def start(name)
+    #        ...
+    #     end
+    def self.parameter(type, name=nil, description=nil)
+      Thread.current[:op].parameters &lt;&lt; JMX::Parameter.new(type, name, description)
+    end
+  
+    # Used to declare the return type of the operation
+    #     operation &quot;Used to update the name of a service&quot;
+    #     parameter :string, &quot;name&quot;, &quot;Set the new name of the service&quot;
+    #     returns :void
+    #     def do_stuff
+    #        ...
+    #     end
+    def self.returns(type)
+      Thread.current[:op].return_type = type
+    end
+  
+    def initialize(description=&quot;&quot;)
+      name = self.class.to_s
+      operations = self.class.operations.to_java(MBeanOperationInfo)
+      attributes = self.class.attributes.to_java(MBeanAttributeInfo)
+      @info = MBeanInfo.new name, description, attributes, nil, operations, nil
+    end
+  
+    # Retrieve the value of the requested attribute
+    def getAttribute(attribute)
+      send(&quot;jmx_get_&quot;+attribute.downcase).value
+    end
+  
+    def getAttributes(attributes)
+      attrs = javax.management.AttributeList.new
+      attributes.each { |attribute| send(&quot;jmx_get_&quot;+attribute.downcase) }
+      attrs
+    end
+  
+    def getMBeanInfo; @info; end
+  
+    def invoke(actionName, params=nil, signature=nil)
+      send(actionName, *params)
+    end
+  
+    def setAttribute(attribute)
+      send(&quot;jmx_set_#{attribute.name.downcase}&quot;, attribute.value)
+    end
+  
+    def setAttributes(attributes)
+      attributes.each { |attribute| setAttribute attribute}
+    end
+  
+    def to_s; toString; end
+    def inspect; toString; end
+    def toString; &quot;#@info.class_name: #@info.description&quot;; end
   end
-
-  # Use the operation method to declare the start of an operation
-  # It takes as an optional argument the description for the operation
-  # Example:
-  #     operation &quot;Used to start the service&quot;
-  #     def start
-  #     end
-  #--
-  # Last operation wins if more than one
-  #++
-  def self.operation(description=nil)
-    # Wait to error check until method_added so we can know method name
-    Thread.current[:op] = JMX::Operation.new description
-  end
-
-  # Used to declare a parameter (you can declare more than one in succession) that
-  # is associated with the currently declared operation.
-  # The type is mandatory, the name and description are optional.
-  # Example:
-  #     operation &quot;Used to update the name of a service&quot;
-  #     parameter :string, &quot;name&quot;, &quot;Set the new name of the service&quot;
-  #     def start(name)
-  #        ...
-  #     end
-  def self.parameter(type, name=nil, description=nil)
-    Thread.current[:op].parameters &lt;&lt; JMX::Parameter.new(type, name, description)
-  end
-
-  # Used to declare the return type of the operation
-  #     operation &quot;Used to update the name of a service&quot;
-  #     parameter :string, &quot;name&quot;, &quot;Set the new name of the service&quot;
-  #     returns :void
-  #     def do_stuff
-  #        ...
-  #     end
-  def self.returns(type)
-    Thread.current[:op].return_type = type
-  end
-
-  def initialize(description=&quot;&quot;)
-    name = self.class.to_s
-    operations = self.class.operations.to_java(MBeanOperationInfo)
-    attributes = self.class.attributes.to_java(MBeanAttributeInfo)
-    @info = MBeanInfo.new name, description, attributes, nil, operations, nil
-  end
-
-  # Retrieve the value of the requested attribute
-  def getAttribute(attribute)
-    send(&quot;jmx_get_&quot;+attribute.downcase).value
-  end
-
-  def getAttributes(attributes)
-    attrs = javax.management.AttributeList.new
-    attributes.each { |attribute| send(&quot;jmx_get_&quot;+attribute.downcase) }
-    attrs
-  end
-
-  def getMBeanInfo; @info; end
-
-  def invoke(actionName, params=nil, signature=nil)
-    send(actionName, *params)
-  end
-
-  def setAttribute(attribute)
-    send(&quot;jmx_set_#{attribute.name.downcase}&quot;, attribute.value)
-  end
-
-  def setAttributes(attributes)
-    attributes.each { |attribute| setAttribute attribute}
-  end
-
-  def to_s; toString; end
-  def inspect; toString; end
-  def toString; &quot;#@info.class_name: #@info.description&quot;; end
+  
 end
+  
\ No newline at end of file</diff>
      <filename>lib/dynamic_mbean.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ class TestDynamicMBean &lt; Test::Unit::TestCase
   import java.lang.management.ManagementFactory
   import javax.management.ObjectName
 
-  class AttributeTypesMBean &lt; DynamicMBean
+  class AttributeTypesMBean &lt; JMX::DynamicMBean
     rw_attribute :string_attr, :string, &quot;a String attribute&quot;
     rw_attribute :byte_attr, :byte, &quot;a Byte attribute&quot;
     rw_attribute :int_attr, :int, &quot;a Integer attribute&quot;
@@ -59,7 +59,7 @@ class TestDynamicMBean &lt; Test::Unit::TestCase
     assert_equal(true, mbean.boolean_attr)
   end
 
-  class OperationInvocationMBean &lt; DynamicMBean
+  class OperationInvocationMBean &lt; JMX::DynamicMBean
     operation &quot;reverse the string passed in parameter&quot;
     parameter :string, &quot;arg&quot;, &quot;a String to reverse&quot;
     returns :string</diff>
      <filename>test/tc_dynamic_mbean.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3a5dbfa43d031ecd02d80d365b1fa1b1c2eb7394</id>
    </parent>
  </parents>
  <author>
    <name>Jeff Mesnil</name>
    <email>jmesnil@gmail.com</email>
  </author>
  <url>http://github.com/jmesnil/jmx4r/commit/0da6a8bead018ae21307bc2cbe0d5b62c93c5eed</url>
  <id>0da6a8bead018ae21307bc2cbe0d5b62c93c5eed</id>
  <committed-date>2009-06-15T10:24:48-07:00</committed-date>
  <authored-date>2009-06-15T10:24:48-07:00</authored-date>
  <message>moved DynamicMBean class inside the JMX module</message>
  <tree>14d7f309d7b8d1f4ffe5eccbe5addb0b84973df1</tree>
  <committer>
    <name>Jeff Mesnil</name>
    <email>jmesnil@gmail.com</email>
  </committer>
</commit>
