Re: can you create an object in ruby and register it in the JMX server?

Thanks!

Well work is asking me to do this for my day job right now … and they
said I can contribute back to the community any Open source stuff I help
with. so Double bonus!
So if you have any guidelines on submitting patches let me know. (I’ve
not submitted to open source projects before)

I’m off to look at these links and source

Thanks for your quick reply!
Jay

On Wed, Jun 25, 2008 at 4:00 PM, Thomas E Enebo wrote:

I wrote something which gets you a good part of the way to what you
want:Â jruby -S gem install jmx

For making beans in Ruby it looks something like this:

class MyDynamicMBean < RubyDynamicMBean

 operation “Doubles a value”
 parameter :int, “a”, “Value to double”
 returns :int
 def double(a)
   a + a
 end

end

I only support advertising operations at this point, but plan on
attributes and notifications on a really rainy day (of course
contributions are always welcome). Slightly more details can be found
here (besides the source code + test/examples):

http://ruby.dzone.com/news/jmx-gem-released
http://ruby.dzone.com/news/jmx-gem-released Â
http://ruby.dzone.com/news/jmx-gem-released

-Tom

On Wed, Jun 25, 2008 at 2:51 PM, Jay McGaffigan <[email protected]
mailto:[email protected] Â mailto:[email protected] >
wrote:

, I
Specifically I would like to be able to create a ruby management bean

it generic enough that I’d like to add it to the jmx4r gem or other
implements the DynamicMBean interface. From there people could mixin
point me
Java:
       }

       }
to
    mbi = javax.management.MBeanInfo.new(self.class, "Sample Dynamic
  def self.register_bean(bean)

to work but I was thinking that creating a dsl in ruby would let me


To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email
http://xircles.codehaus.org/manage_email Â
http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
http://www.bloglines.com/blog/ThomasEEnebo Â
http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] mailto:[email protected] Â mailto:[email protected] Â ,
[email protected] mailto:[email protected] Â
mailto:[email protected]


To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email
http://xircles.codehaus.org/manage_email Â
http://xircles.codehaus.org/manage_email