Creating a Management Bean
An MBean’s purpose is to help manage your application. Many Ruby applications provide this same kind of interface with RESTful services, but those tend to get in the way of the real application. MBeans provide a better interface because they’re separated from the rest of the application, which means they have their own security, port, and graphical interface. As a result, there’s less of a chance that an ordinary user will accidentally (or intentionally) gain access to the management services.
Let’s create an MBean that you can use to manage the logging level of your Rails application. You’ll start by adding the jmx4r gem to your Gemfile and running Bundler.
| | gem 'jmx4r' |
Next, create ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access