8 Replies Latest reply on Apr 30, 2008 12:47 PM by vickyk

    MBean for inbound-resourceadapter

    michele.curioni

      Hi there,
      is a JCA 1.5 inbound-resourceadapter manageable using JMX out of the box?

      I cannot find any existing MBean in jboss that I could use to control the resource adapter.

      Thanks,
      Michele

        • 1. Re: MBean for inbound-resourceadapter
          vickyk

           

          "michele.curioni" wrote:
          Hi there,
          is a JCA 1.5 inbound-resourceadapter manageable using JMX out of the box?

          I cannot find any existing MBean in jboss that I could use to control the resource adapter.
          Thanks,
          Michele


          What control you want to have exactly ?
          You should be able to control the ResourceAdapter specific controls thorugh the following MBean
          jboss.jca:name='yourrar.rar',service=RARDeployment

          eg

          jboss.jca:name='jboss-local-jdbc.rar',service=RARDeployment



          • 2. Re: MBean for inbound-resourceadapter
            michele.curioni

            Thanks Vicky, that's what I was looking for.

            The resource adapter I defined has other public methods, which are not visible from from this MBean.
            How can I invoke them?
            Ie. can I reference my Resource Adapter through the above MBean?

            Thanks,
            Michele

            • 3. Re: MBean for inbound-resourceadapter
              vickyk

               

              "michele.curioni" wrote:

              The resource adapter I defined has other public methods, which are not visible from from this MBean.
              How can I invoke them?
              Ie. can I reference my Resource Adapter through the above MBean?
              Thanks,
              Michele

              No I don't think you should be able to do that , I am not going to look at that in details unless I understand why you are doing so ?
              Why would you need to call the resource adapter methods , usually you don't do that .
              What is your use case ?


              • 4. Re: MBean for inbound-resourceadapter
                michele.curioni

                I have a TCP inbound resource adapter, which listens on various ports.
                I want to be able to query which ports are active, be able to stop listening on some port, and start again, etc.
                Basically I need to manage the resource adapter functionality, without affecting its lifecycle.

                Thanks,
                Michele

                • 5. Re: MBean for inbound-resourceadapter
                  vickyk

                   

                  "michele.curioni" wrote:
                  I have a TCP inbound resource adapter, which listens on various ports.
                  I want to be able to query which ports are active, be able to stop listening on some port, and start again, etc.
                  Basically I need to manage the resource adapter functionality, without affecting its lifecycle.

                  Thanks,
                  Michele



                  Can you create a Mbean inside the RAR which will help you to manage the details which you have explained . let me know if this helps .

                  • 6. Re: MBean for inbound-resourceadapter
                    michele.curioni

                    Vicky,
                    to do that the MBean would need to have a reference to the Resource Adapter, but how?
                    It seems that it cannot be looked up directly,
                    so the only other way is for the resource adapter to register itself with the new MBean at startup.
                    Doing so the resource adapter will be dependent on the new MBean, which I wanted to avoid, for I prefer to keep business code indipendent of management code.

                    Is that what you had in mind?

                    Thanks,
                    Michele

                    • 7. Re: MBean for inbound-resourceadapter
                      vickyk

                       

                      "michele.curioni" wrote:
                      Vicky,
                      to do that the MBean would need to have a reference to the Resource Adapter, but how?


                      No , MBean should not have the reference of RA.
                      The RA bootstrapping is done in the AS environment , so during the RA bootstraping you can get a reference of MBeanServer and then dynamically add the MBean which will control the stuff you want .

                      Yes getting the MBeanServer in the RA's bootstrap(...) would make the RA tied to the Jboss but getting it generic should not be that difficult .

                      Did you get it ?

                      • 8. Re: MBean for inbound-resourceadapter
                        vickyk

                         

                        "michele.curioni" wrote:
                        Vicky,
                        to do that the MBean would need to have a reference to the Resource Adapter, but how?


                        No , MBean should not have the reference of RA.
                        The RA bootstrapping is done in the AS environment , so during the RA bootstraping you can get a reference of MBeanServer and then dynamically add the MBean which will control the stuff you want .

                        Yes getting the MBeanServer in the RA's bootstrap(...) would make the RA tied to the Jboss but getting it generic should not be that difficult .

                        Did you get it ?