admin@glassfish.java.net

how can amx-impl load an interface from a module?

From: Lloyd L Chambers <Lloyd.Chambers_at_Sun.COM>
Date: Thu, 26 Jun 2008 11:33:02 -0700

Jerome and/or Sahoo,

AMX currently supports the creation of config MBeans for @Configured
interfaces like this:

@AMXConfigInfo
( amxInterfaceName
="com.sun.appserv.management.config.HTTPListenerConfig", ...)
@Configured
public interface HttpListener extends ConfigBeanProxy, Injectable,
PropertyBag {...}

The @AMConfigInfo specifies that the formal interface for an MBean
representing the @Configured HttpListener is to be found as
com.sun.appserv.management.config.HTTPListenerConfig.

So at runtime, the amx-impl module would need to be able to load the
interface 'com.sun.appserv.management.config.HTTPListenerConfig'. Yet
it cannot have any explicit dependency on the module, nor can it even
know in advance how many module(s) might exist.

===> Essentially it needs Class.forName() functionality. What is the
right way to load the interface class? Is it even possible?

Lloyd
---
Lloyd L Chambers
lloyd.chambers_at_sun.com
Sun Microsystems, Inc