Chapter 8. FAQ

Table of Contents

MX4J Frequently Asked Questions

MX4J Frequently Asked Questions

1. How it is possible to change the default log level of the MX4J implementation to understand what is going on ?

Just set the system property 'mx4j.log.priority' to one of these values (from less verbose to more verbose):

  • fatal
  • error
  • warn
  • info
  • debug
  • trace
like this example command line:

> java -Dmx4j.log.priority=debug -classpath . my.package.Application

See the MX4J documentation about logging for more information.

2. The MLet file format is not enough flexible for my needs. Is there a more powerful configuration file format, maybe in XML, by means of which will be possible to load and configure the MBeans of a system ?

MX4J, from version 2.0, supports a configuration file format in XML, by which it is possible to specify constructor arguments to MBeans, call methods on object and MBeans, register and unregister MBeans and so on.
Think of this configuration file format as an XML way to invoke Java methods and JMX attributes or operations.

The class that allows this is Refer to the MX4J tools documentation for details about usage of this class.