Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMX::MBeanProxy#method_missing is broken #5

Closed
tobias opened this issue Apr 12, 2011 · 3 comments
Closed

JMX::MBeanProxy#method_missing is broken #5

tobias opened this issue Apr 12, 2011 · 3 comments

Comments

@tobias
Copy link
Contributor

tobias commented Apr 12, 2011

It currently calls java_args(args), instead of java_args(signature, args). I would fix it, but I don't know what signature should be in this case.

@enebo
Copy link
Owner

enebo commented Apr 12, 2011

You are correct that something is not correct there.....but.....did you run into something which hit method_missing? I am thinking I should just remove the method_missing hook since all operations and attriibutes are defined on initialization of the MBeanProxy. Thoughts on this? I am thinking it is a vestigial organ. If not then I need to rediscover why it is needed and then add a test for it.

@tobias
Copy link
Contributor Author

tobias commented Apr 12, 2011

No, I only hit it because we expose a runtime pool via an MBean in TorqueBox that allows for arbitrary debug code evaluation (via Ruby#evalScriptlet()), and calling a top level non-existent method inside the script passed to evalScriptlet() raises a NoMethodError, which appears to bubble up and trigger MBP#method_missing. As a workaround, I'm actually overriding method_missing on the MBean object to raise NoMethodError. I have no need for method_missing on the MBean, so feel free to cut it off.

@enebo
Copy link
Owner

enebo commented Apr 12, 2011

I cannot see how that method could still be used so I removed it. As it was written it wouldn't work anyways....so blam!

Fixed and released as version 0.7 of gem. Thanks for the report.

@enebo enebo closed this as completed Apr 12, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants