On 12/5/06, Bernd Fondermann <[EMAIL PROTECTED]> wrote:

I looked into it but to no avail. :-(
If you have something to share to workaround or fix this problem this
is highly appreciated.

As I said, the easiest way would be to check whether the JMX server is
the MX4J one (e.g. via simple instaneof check), and if not, then
register the HTTP adaptor manually if it is turned on in the
configuration. Registering works something like this:

private static void initializeManagementBeans(int port) throws
InstanceAlreadyExistsException,

MBeanRegistrationException,

NotCompliantMBeanException,

MalformedObjectNameException,
                                                              IOException
{
   MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();

   HttpAdaptor adapter = new HttpAdaptor();
   ObjectName  name    = new
ObjectName("org.apache.james.jmx:name=HttpAdaptor");

   mbeanServer.registerMBean(adapter, name);
   adapter.setPort(port);
   adapter.setHost("0.0.0.0");
   adapter.start();

   mbeanServer.registerMBean(Log4JMBeanImpl.newInstance(), new
ObjectName("org.apache.james:name=Logger"));
}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to