3 Replies Latest reply on Dec 22, 2004 5:08 PM by tom.elrod

    server invocation handler and JMX

    mazz

      So, this stuff looks really cool. I was in the middle of writing a server class to mimic SimpleServer when I realized that that is what that remoting-service.xml deploys for you! So, running inside of JBoss with remoting-service deployed gives me that for free.

      All I need to do is write my ServerInvocationHandlers right? With the config defining my locator URI, all I have to do it plugin my handlers with their respective . So, really I just have to worry about writing the business logic in my invocation handlers and the registering with the network manager, marshalling/unmarshalling, etc. is taking care for me. Nice.

      Question - can I write my handlers as MBeans themselves? This would allow local invocation through JMX API? Not sure how that would get configured - since just takes a class name.

      Example:

      I deploy my own handler services that depend on the remoting service. The remoting service should be told that I am giving it a JMX name - e.g. jboss:name=MyInvoker

      Not sure where the upcoming JMX invocation handler fits it - would it just remote my JMX interface to that service? In that case I don't even write to the invocation handler interface; I just write MBeans and the JMX subsystem invocation handler will remote my JMX interface to my service?

      Sorry for the slew of questions - its starting to click for me, but I'm not grasping it the whole way yet...

      John

        • 1. Re: server invocation handler and JMX

          No way to make the handler an MBean at the moment. Would not count on the JMX invocation handler for a while (as will be when I get to JSR 160, which is a ways out).

          It wouldn't be that difficult to call on the handlers via JMX and just specify the object name. What's the use case for this (not that I think it is a bad idea, just curious). If this is something you really want to see added, please create an issue for this in jira.jboss.com.

          Thanks.

          -Tom


          • 2. Re: server invocation handler and JMX
            mazz

            No current requirements, I just thought it would be cool :-) Actually, I'm thinking make it an MBean to allow for inproc calls more efficient (if I have an client inproc with the MBeanServer, would be better to make a local JMX API call as opposed to going through the remote layer and incur the penalty of (un)marshalling)?

            • 3. Re: server invocation handler and JMX

              Is a good idea to have it, so will create a jira issue. BTW, remoting will do in process calls automatically if sees that the server and client remoting invoker live in the same jvm.