1 Reply Latest reply on Dec 4, 2014 12:32 PM by Jay SenSharma

    Modify MDB Pool at runtime through HTTP JSON API

    Sivakumar KN Newbie

      Hi,

       

      Is there a way that we can modify the message driven bean pool size through HTTP JSON API? or through Mbean server?

       

      Jboss version - EAP 6.1.1

        • 1. Re: Modify MDB Pool at runtime through HTTP JSON API
          Jay SenSharma Master

          You can use the JSON API as following (assuming your admin credentials are  username: admin  and password: admin_123)

           

          HTTP JSON API based

          curl --digest -L -D - http://admin:admin_123@localhost:9990/management --header "Content-Type: application/json" -d '{"operation":"write-attribute","address":[{"subsystem":"ejb3"},{"strict-max-bean-instance-pool":"mdb-strict-max-pool"}],"name":"max-pool-size","value":10, "json.pretty":1}'
          
          

           

           

          jboss-cli based approach

           

          /subsystem=ejb3/strict-max-bean-instance-pool=mdb-strict-max-pool:write-attribute(name=max-pool-size,value=30)
          
          

           

          Change will be reflected in the ejb3 subsystem:

           

                      <pools>
                          <bean-instance-pools>
                              <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                              <strict-max-pool name="mdb-strict-max-pool" max-pool-size="30" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
                          </bean-instance-pools>
                      </pools>
          

           

          NOTE:   this is not dynamic change for your application.    But unfortunately in both cases you will either need to redeploy your application or else you will have to restart your JBoss to make this changes reflected.