|>
|> the other interface for Dynamic MBeans is one with "invoke" so it would
|map
|> to the proxy invocation...
|> but I am not sure I am seeing where you go with the "dynamic MBeans"...
|
|There are two types of MBeans. The first is the standard MBean which
|implements
|the interface named <BeanClass>MBean. But the dynamic MBean implements
|the DynamicMBean and then delivers an MBeanInfo object on (I think)
|getMBean-
|Info() method (declared in the DynamicMBean). But the MBeanInfo defines the
|interface of the dynamic MBean and not the DynamicMBean interface.
|Therefore
|the JMX Connector cannot get an Interface class because the MBean-Interface
|structure is defined in the MBeanInfo.
|In this case I cannot generate a proxy, or can I?
well again 2 things
1- JBoss afaik (but I lose track of what people add these days) only uses
Standard MBeans.
2- The JSR i work on defines the interfaces/information model explicitely.
So the proxy stuff will work since you have the definition, (yes you do)
Ok for the dynamic generation of classes, look at what Dan did (proxy
package, proxy.proxy is what you want to look at) frankly it's black magic,
on the fly bytecode generation. He claims it is simple, I don't even want
to stick my head in there.
So if you only have "meta" description or whatever I believe there is a way
to generate the class somewhere write to file feed it to a classloader and
feed that to the proxy generation... tada, just add some CPU behind it and
it is red red alive...
but really... where do you need the "dynamic" MBean, it could be the case
that all you really want to generate is the "invoke" call on that interface,
it will map nicely to the Proxy InvocationHandler and the MBeanServer behind
it.
|The problem with JMX is that it does not offer the interface of the MBean
|through a Java interface but through a MBeanInfo class and MBeanFeatureInfo
|(and its subclasses) etc.
|Yes, when I can deliver the Java Interface to the client or create a Java
|Interface
|on the client I can use this to create a Proxy class (and its Invoker which
|just
|use the JMXConnector and its methods to invoke the methods on the server-
|side).
sure that is the purpose of DynamicMBeans, to **not** type the interface so
you can just invoke() on it. Don't fall prey to complexiitis, I don't
know...
'Low tech' is GOOD sometimes
|As I said above JMX works not with Interfaces and as far as I
|understand you
|is
|that you offer the Interface to the JNDI going around JMX. This is also a
|way
|to contact the client but it is not the JMX way. Do you want this?
Ok that is something that I fore-see, but it is not set in stone, but how I
am to find the programmatic interface to the proxy from a remote tool? so
we can hardcode the lookup of the server and bla bla or we can work on
JNDI... <dig/> JNDI seems the right way to go... don't know...
|There are two ways to communicate with the client:
you mean for the client to communicate with the agent? (who communicates
with the client?)
|- First you can use an Adaptor which supports a protocol dependent way to
|access
| the server (HTML, SNMP, CORBA etc.). For each protocol you have
|to deliver
| its own Adaptor and the client has to understand this particular
|protocol.
yes
|The good
| side is that the Adaptor needs no Java client-side code.
possibly yes, that is what we use today on JBoss:8082, a web browser :)
|- Second you can use an Connector which supports a protocol INdependent way
|to
| access the server (RMI, JMS, CORBA etc.).
|
I was trying to think about JMS the other day... I don't see how the
get/getNext of SNMP which are essentially get/response mechanisms would map
to JMS... you need more than a "one=way" mechanism to get the same
functionality. Sure the "set" stuff is OK...
|The client must be able to work
|with
| Java but you can change the Connector without changing the client.
Ok... here you are treading on deep waters. Listen to me carefully, young
man... This scar on my shoulder was dug very recently :)))
I DEEPLY BELIEVE THAT THE ABOVE STATEMENT IS TRUE (the client MUST be able
to work with java) OTHERWISE THERE IS NO SUCH THING AS PORTABLE
ADMINISTRATION IN J2EE...
But we are alone in our belief, you hear me?
|What I have in mind:
|- JMX Connector uses any protocol
yes, at least 2 ways ones RMI/HTTP
|- JMX Connector does no offer the MBeanServer interface (as done now) but
| delivers Proxy-classes to the client which he can work on like regular,
|local Java
| classes.
Yes keep it simple use the declared interfaces, the Dynamic mumbo jumbo keep
warm
read my lips SIMPLE
|- The Connector's Invoker then is used to call the MBeanServer on the
|server-side
| by the low-level JMX Connector code.
yes, ok, it is then *very* close to the EJB structure. The key is in the
registration of stuff in JNDI
you might want to specify a file where we give the names of the object
(ejb-name or jndi-name equiv)
|
|IMO JMX has some advantages to just offering the MBean interfaces through
|JNDI
|because it is more secure, it is dynamic (can als be a disadvantage) and it
|can be
bla bla... you in sales? JMX has the advantage of being buzz-word compliant
sure...but
it is simple because the implementation of the invoke from IH -> MBeanServer
is trivial
|used by an Adaptor and by a Connector (both together supports Java and
|NON-Java
|clients the same way).
I don't really agree to support non-java SNMP clients throws a bit off the
stuff for JNDI registered objects. FYI we can put 2 invocation lines (SNMP
+ our super-duper stuff).
|But in this case I am only taking about the JMX
|CONNECTOR
|because only a Java client can create and/or use a Proxy class.
correct we agree, we need the java semantics to call the object.
Listen to me again the advantages are clear
1- define the object interfaces. Map J2EE administration we will be JSR 77
compliant
2- come up with the naming structures so that you truly offer a distributed
platform for management
3- the tool becomes then java based and kinda trivial
4- we are running ahead of the pack... the pack even in JSR77 doesn't see
this as clearly... (bla bla WBEM/SNMP bla bla)
run, lola, run
marc
_______________________________
"If you were to be caught,
MI5 will deny any knowledge..."
_______________________________
|
|Have fun - Mad Andy
|
|
|