Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-3454

Unable to set negative values for MBean attributes using Twiddle command

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • JBossAS-4.0.5.GA
    • JBossAS-4.0.3 SP1
    • Other
    • None

      When a customer tries to execute twiddle to set a negative value for one of the attributes, it throws the exception.

      For example when I try to set a Scheduler MBean InitialRepitions value to -1, it fails.

      Command: twiddle set "jboss:service=Scheduler" "InitialRepetitions" "-1".

      Possible problem might be, GetOpt class used in the org.jboss.console.twiddle.SetCommand Class is not accepting the -ve values.It consider the -ve numbers as

      an invalid option.

            [JBAS-3454] Unable to set negative values for MBean attributes using Twiddle command

            Closing resolved issues.

            Dimitrios Andreadis added a comment - Closing resolved issues.

            Code is completed:Setcommand and SetAttrCommand is modified to accept valid attributes.

            Sakthi Samabsivam (Inactive) added a comment - Code is completed:Setcommand and SetAttrCommand is modified to accept valid attributes.

            When we try to set MBean attribute using SetCommand class, the arguments are filtered by the Getopt utility class used in the SetCommand class. But, the validity
            of the arguments should (can) be checked by the corresponding MBeans instead of the GetOpt class.I modified the set command class based on this idea.

            Sakthi Samabsivam (Inactive) added a comment - When we try to set MBean attribute using SetCommand class, the arguments are filtered by the Getopt utility class used in the SetCommand class. But, the validity of the arguments should (can) be checked by the corresponding MBeans instead of the GetOpt class.I modified the set command class based on this idea.

              ssambasivam Sakthi Samabsivam (Inactive)
              ssambasivam Sakthi Samabsivam (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: