Change Notes item #547479, was opened at 2002-04-23 12:34
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=547479&group_id=22866

Category: JBossMX
Group: None
Status: Open
Priority: 5
Submitted By: Juha Lindfors (juhalindfors)
Assigned to: Juha Lindfors (juhalindfors)
Summary: MBeanProxy Changes

Initial Comment:
The MBean proxy instances are now MBeans themselves,
and can be registered to an MBean server (implementing
DynamicMBean interface). This allows for a trivial
construction of redirects between MBean servers, for
insance:

  client --> Server A (proxy) --> Server B (resource)

where the management interface of the proxy in Server A
is identical to the management interface in Server B.
In other words, a client executing
server.getMBeanInfo() on a proxy instance will return
the MBeanInfo of the target MBean (proxies are
transparent).

Additionally, the proxy can be used to invoke the MBean
either with a typed Java interface or detyped
DynamicMBean interface depending on which factory
method is used by the client:

  MBeanProxy.get(Class interface, ObjectName name,
MBeanServer server)

will return a typed proxy, where as

  MBeanProxy.get(ObjectName name, MBeanServer server)

will return a "detyped" DynamicMBean proxy interface.

Thirdly, the proxy allows the client access to the
MBean server instance the target MBean is registered to
by implementing a ProxyContext interface. The client
can access the proxy context by casting the created
proxy instance as follows:

  Object proxy = MBeanProxy.get(...);
  ProxyContext ctx = (ProxyContext)proxy;

To access the methods of the MBean server the proxy
target MBean is registered to, the client can invoke:

  MBeanServer server = ctx.getMBeanServer();
  server.queryMBeans(...)

to query the containing server, for instance. Later the
same context interface can be used to configure
interceptors on the proxy ("client" interceptors),
configure the connector client properties (RMI, JMS,
SOAP), or expose the proxys configuration as an MBean.

Currently, in addition to the access to the MBean
server interface, the ProxyContext interface provides
the client access to custom exception handlers via the
setExceptionHandler() method. This allows the client to
override the exception logic handling inside the proxy,
for instance, how the proxy should react to
InstanceNotFound exceptions.




----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=381174&aid=547479&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to