Andy \"Mad\" Schaefer wrote:
> I delved a little bit in jBoss Server code and discovered that you use
> java.lang.reflect.Proxy to create dynamic Proxy classes for a given
> Interface.
> Before this I always thought that it is impossible to create a Proxy class
> on the JMX client side to deal with the remote MBeans without dealing
> with JMX Connector etc.

And it is indeed impossible, generally speaking.

> But know the problem is that JMX does not send Interfaces to the client
> but a JMX structure to reflect the MBeans on the server-side.

Exactly.

> NOW my question is how to create an Interface on the client-side to
> create from this Interface the Proxy class or is there a way to create a
> proxy without an Interface?

The only way I can think of is to create the byte array for the class,
and convert it to a class dynamically.

> The problem with JMX is that only standard MBeans have to implement
> an Interface but for the other types there is no interface.

Exactly. And while we have used standard MBeans so far, I believe we
will switch to at least dynamic MBeans fairly soon.

> If this is doable I will change the JMX Connector on the client-side
> therefore
> that the client see the Proxy-Objects and deal with them instead of the
> MBeanServer interface. What do you think?

I think you should stick with the MBeanServer interface. I don't think
there is enough value in doing explicit proxy objects with these
methods, since the code to access the MBeanServer in the client is
generic enough anyway.

regards,
  Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]

Reply via email to