6 Replies Latest reply on Dec 5, 2001 4:17 PM by azakkerman

    JMX connectors and adaptors

    azakkerman

      I am wondering how to use the connectors and adaptors.

      My goal is to be able to invoke J2eeDeployer MBean on an arbitrary JBoss server from an EJB running on a particular server. (The ejb is a part of 'management' application that deploys various things on a group of managed JBoss servers).

        • 1. Re: JMX connectors and adaptors
          marc.fleury

          There is an EJB adaptor to JMX use that to proxy your invocation to the target j2ee deploy (or something like that ;). If not make a custom ejb whose sole purpose in life is to call that mbean on the target system, should be straightforward

          • 2. Re: JMX connectors and adaptors
            davidjencks

            It's not from an ejb... but you might look at JBossTestServices in the testsuite for some examples of remote programatic deployement (the testsuite all uses this).

            • 3. Re: JMX connectors and adaptors
              marc.fleury

              Dude

              1- you are absolutely correct the test suite does start from one VM to another so that code would be really relevant

              2- motherf8cker how did you go up to 285 answers!!! ouch, you beat me on number of questions, that can't be, I am going to start answer "yes" "no" to any mail I read see if I catch up with you :)

              • 4. Re: JMX connectors and adaptors
                azakkerman

                I was able to use RMIConnector to call the J2eeDeployer bean from an EJB running on the same JBoss server. My goal is to get this bean to be able to call N different servers.

                There is a slight problem with the API for creating the RMIConnectors to do this. The N different servers do not share the JNDI name space, so I have to reconfigure getting the InitialContext to lookup the Adaptor for each Connector by setting PROVIDER_URL. I cannot use a single jndi.properties file. So the constructor for RMIConnector that tries to lookup the Adaptor in JNDI is useless. I have to manually lookup the Adaptor myself and call the other constructor. No big deal, if this is the intended usage.

                Hopefully, I'll test today invocations across JBoss servers.

                Thanks for replies.

                Anatoly

                • 5. Re: JMX connectors and adaptors
                  marc.fleury

                  Is this anatoly akkerman?

                  submit a patch man, do you have a problem with giving us that code?

                  • 6. Re: JMX connectors and adaptors
                    azakkerman

                    > Is this anatoly akkerman?
                    >

                    Yeap, that's me.

                    > submit a patch man, do you have a problem with giving
                    > us that code?

                    I have not patched anything, just using a different constructor. For now it works. If I see a need to modify the API, I might patch it. Don't fix it if it ain't broken :)

                    I am new to JMX, so for now let me just try using what's there already.