4 Replies Latest reply on Feb 17, 2010 8:32 AM by ataylor

    JMSServerControl and createConnectionFactory

    ataylor
      JMSServerControl has umpteen methods for creating connection factories, do we actually need all of them.  A lot of them take arrays as parameters which wouldnt work in most jmx consoles anyway. Can we consolidate what we have, maybe 1 or 2 convenience methods and one that takes every param. If we do need them all which ones should we expose via the consoles
        • 1. Re: JMSServerControl and createConnectionFactory
          timfox
          I suppose, the question is, why does it have so many in the first place?
          • 2. Re: JMSServerControl and createConnectionFactory
            jmesnil

            The versions with Object[] were not meant to be used from a GUI console but from JMX code.

            We do not need to expose them in JOPR.

             

            This leaves us with still 8(!) createConnectionFactory methods.

             

            We then have version with and without clientID parameter.

            We could remove the methods with the clientID parameter and make the clientID attribute writable on the ConnectionFactoryControlMBean.

             

            We'd end up with 4 createConnectionFactory() methods:

            - with multiple live and backup configs, w/o parameters (message size, producer rate, etc.)

            - with multiple live and backup configs, w/ all parameters

            - with discovery config, w/o all parameters

            - with discovery config, w/ all parameters

             

            Regarding the ConnectionFactory parameters, it's all-or-nothing which is a pita if you need to modify only 1 or 2 parameters.

             

            We could instead make all attributes writable on the ConnectionFactoryControlMBean and have only 2 createConnectionFactory methods:

            - with multiple live and backup configs, w/o parameters

            - with discovery config, w/o parameters

             

            Then the user can tweak the CF configuration by using the corresponding ConnectionFactoryControlMBean.

            wdyt?

            • 3. Re: JMSServerControl and createConnectionFactory
              timfox

              jmesnil wrote:

               


               

              We could instead make all attributes writable on the ConnectionFactoryControlMBean and have only 2 createConnectionFactory methods:

              - with multiple live and backup configs, w/o parameters

              - with discovery config, w/o parameters

               

              Then the user can tweak the CF configuration by using the corresponding ConnectionFactoryControlMBean.

              wdyt?

              +1. This is basically how it is done when manually instantiating a ClientSessionFactoryImpl instance. There are just a few simple Constructors and the rest of the stuff is accessed via getters/setters.

               

              We could model it on that.

              • 4. Re: JMSServerControl and createConnectionFactory
                ataylor
                +1, makes sense to me