Comments (5)
Actually, a simpler demonstration that doesn't require launching the JVM with JMX available:
test.rb:
require 'jmx'
Java::Sun
puts JMX::MBeans.parent_for "sun.something.SomethingElse"
JRuby 1.7:
$ rbenv global jruby-1.7.14
$ ruby test.rb
JMX::MBeans::Sun::Something
SomethingElse
JRuby 9000:
$ rbenv global jruby-9.0.3.0
$ ruby test.rb
ArgumentError: Java package `sun' does not have a method `const_set'
method_missing at uri:classloader:/jruby/java/java_package_module_template.rb:13
block in parent_for at /home/saveland/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/jmx-0.9/lib/jmx/mbeans.rb:20
each at org/jruby/RubyArray.java:1560
inject at org/jruby/RubyEnumerable.java:895
parent_for at /home/saveland/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/jmx-0.9/lib/jmx/mbeans.rb:12
<top> at test.rb:4
from jmx.
I'm not sure if it's the same issue, but #16 may fix this as well.
from jmx.
@tobias @savelandr sure seems like the same issue you had.
from jmx.
Yup, this does fix it. I tried the simple example as well as running Ruby with JMX enabled so the test connects to itself. Thanks!
from jmx.
@savelandr thanks for checking!
from jmx.
Related Issues (9)
- setAttributes is internally using invoke on MBean HOT 5
- Gem doesn't allow specifying a service url
- MBean attributes shouldn't be tied to MBean instance variables. HOT 4
- MBeans created by another MBean don't have attributes/operations show up HOT 2
- Extended MBeans don't have parents operations/attributes. HOT 2
- JMX::MBeanProxy#method_missing is broken HOT 3
- MBeanServer#[] crashes in const_defined? when MBean class name contains $ HOT 5
- The url in the gemspec points to the old repo location (enebo/jmx) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmx.