-
1. Re: exposing jmx mbeans to remote clients
aloubyansky Nov 2, 2004 2:37 AM (in response to dengyuan)Could you try 3.2.6?
In earlier versions it's trickier... You'll have to write some intermediate code that would set methodMap (see MarshalledInvocation) on the invocation object.
In later versions that's transparent. -
2. Re: exposing jmx mbeans to remote clients
dengyuan Nov 2, 2004 11:40 AM (in response to dengyuan)Hi,
I tried the MyService example code on 3.2.6 and it's not worked for me neither.
I found out some interesting things which is the client-side's MarshalledInvocation has Method object setup properly. But, the server-side's MarshalledInvocation doesn't has that piece of information. I can see the MarshalledInvocation passed to Method.invoke doesn't have Method setup. Can someone help ?
TIA, DengYuan -
3. Re: exposing jmx mbeans to remote clients
dengyuan Nov 2, 2004 11:41 AM (in response to dengyuan)Hi,
I tried the MyService example code on 3.2.6 and it's not worked for me neither.
I found out some interesting things which is the client-side's MarshalledInvocation has Method object setup properly. But, the server-side's MarshalledInvocation doesn't has that piece of information. I can see the MarshalledInvocation passed to Method.invoke doesn't have Method setup. Can someone help ?
TIA, DengYuan -
4. Re: exposing jmx mbeans to remote clients
geamanda Nov 11, 2004 8:13 PM (in response to dengyuan)I see the same problem on 3.2.6, now fixed in 3.2.7RC1. My intent is to directly invoke target method. However I was forced to provide this invoke() method in MBean on 3.2.6. (Can't specify InvokeTargetMethod=true, otherwise throws "can't find attribute InvokeTargetMethod")
My side question is there are already many ways to write JMX client for different purposes. For this one purpose, exposing typed MBean interface to remote client, is a common situation. Why we don't follow JMX API way:
Intf proxy = (Intf)MBeanServerInvocationHandler.newProxyInstance(mbsc, name, Intf.class, false);
Well, I'll try this if it's just JBossMX doc is not up to date. -
5. Re: exposing jmx mbeans to remote clients
dimitris Nov 11, 2004 8:21 PM (in response to dengyuan)Do you mean why not using the MBeanServerInvocationHandler.newProxyInstance() method? This produces a local proxy only.
-
6. Re: exposing jmx mbeans to remote clients
starksm64 Nov 11, 2004 8:23 PM (in response to dengyuan)Because the MBeanServerInvocationHandler by definition has no remote capabilities. Providing an rpc invocation interface is not under the JMX umbrella. We just happen to built our remoting framework on top of JMX. This will not be the case in JBoss 5.
-
7. Re: exposing jmx mbeans to remote clients
geamanda Nov 16, 2004 8:06 PM (in response to dengyuan)Thanks for clearing up my confusion on MBeanServerInvocationHandler. The confusion comes from newProxyInstance() takes MBeanServerConnection as a signature and the javadoc talks about MBeanServer (which didn't shout 'local' to me).
Well seems we users are quickly tied to JMX implementation specific ways for reasonable common features.