glassfish
  1. glassfish
  2. GLASSFISH-19482

several issues with list-jms-resources

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b68_EE7MS3
    • Fix Version/s: 4.0_b71
    • Component/s: jms
    • Labels:
      None

      Description

      I created an admin object resources and here is what it read in domain.xml

      <admin-object-resource enabled="false" res-adapter="genericra" res-type="javax.jms.Queue" description="" jndi-name="ABC" class-name="com.sun.genericra.outbound.QueueProxy"></admin-object-resource>

      When i run
      %asadmin list-jms-resources --restype javax.jms.Queue
      ABC
      Command list-jms-resources executed successfully.

      ABC should not be returned since it is using "genericra" as its res-adapter.

        Issue Links

          Activity

          Hide
          David Zhao added a comment -

          Don't return "Nothing to list" for list-jms-resources, list-jmsdest and list-jms-hosts.

          Show
          David Zhao added a comment - Don't return "Nothing to list" for list-jms-resources, list-jmsdest and list-jms-hosts.
          Hide
          Anissa Lam added a comment - - edited

          I have to reopen the issue for the case where no JMS resources is available.
          It should not return the Children with "Nothing to list" in it.

          eg list-jms-resources --restype javax.jms.TopicConnectionFactory

          {extraProperties={methods=[

          {name=GET}

          , {messageParameters={id=

          {acceptableValues=, optional=true, defaultValue=, type=string}, resType={acceptableValues=, optional=true, defaultValue=, type=string}

          }}], commandLog=[list-jms-resources --resType javax.jms.TopicConnectionFactory], jmsResources=[]}, message=, exit_code=SUCCESS, command=list-jms-resources AdminCommand, children=[{message=Nothing to list, properties={}}]}, responseBody={"message":"","command":"list-jms-resources AdminCommand","exit_code":"SUCCESS","extraProperties":{"methods":[

          {"name":"GET"}

          ,{"messageParameters":{"id":

          {"acceptableValues":"","optional":"true","type":"string","defaultValue":""}

          ,"resType":

          {"acceptableValues":"","optional":"true","type":"string","defaultValue":""}

          }}],"jmsResources":[],"commandLog":["list-jms-resources --resType javax.jms.TopicConnectionFactory"]},"children":[{"message":"Nothing to list","properties":{}}]

          When console parses the data returned, there is the children, with message "Nothing to list". This should be the name of a resource if it exists.
          The 'children' key should not exist if there is no children.

          Please look at other list resources command, and have the list-jms-resources behave the same.
          eg.
          http://localhost:4848/management/domain/resources/list-jndi-resources

          Show
          Anissa Lam added a comment - - edited I have to reopen the issue for the case where no JMS resources is available. It should not return the Children with "Nothing to list" in it. eg list-jms-resources --restype javax.jms.TopicConnectionFactory {extraProperties={methods=[ {name=GET} , {messageParameters={id= {acceptableValues=, optional=true, defaultValue=, type=string}, resType={acceptableValues=, optional=true, defaultValue=, type=string} }}], commandLog= [list-jms-resources --resType javax.jms.TopicConnectionFactory] , jmsResources=[]}, message=, exit_code=SUCCESS, command=list-jms-resources AdminCommand, children= [{message=Nothing to list, properties={}}] }, responseBody={"message":"","command":"list-jms-resources AdminCommand","exit_code":"SUCCESS","extraProperties":{"methods":[ {"name":"GET"} ,{"messageParameters":{"id": {"acceptableValues":"","optional":"true","type":"string","defaultValue":""} ,"resType": {"acceptableValues":"","optional":"true","type":"string","defaultValue":""} }}],"jmsResources":[],"commandLog": ["list-jms-resources --resType javax.jms.TopicConnectionFactory"] },"children": [{"message":"Nothing to list","properties":{}}] When console parses the data returned, there is the children, with message "Nothing to list". This should be the name of a resource if it exists. The 'children' key should not exist if there is no children. Please look at other list resources command, and have the list-jms-resources behave the same. eg. http://localhost:4848/management/domain/resources/list-jndi-resources
          Hide
          David Zhao added a comment -

          Fixed.

          Show
          David Zhao added a comment - Fixed.
          Hide
          Anissa Lam added a comment -

          I just realized that we cannot do attachment to the issue.
          Will send the 2 screenshot to David offline.

          Show
          Anissa Lam added a comment - I just realized that we cannot do attachment to the issue. Will send the 2 screenshot to David offline.
          Hide
          Anissa Lam added a comment -

          Another issue.

          #3. When --restype is specified, the 'jmsResources' is not included in the ExtraProperties thats returned in the action report.
          To reproduce, run
          %asadmin create-jms-resource --restype javax.jms.Queue TEST

          Now, go to browser, enter
          http://localhost:4848/management/domain/resources/list-jms-resources
          This has the jmsResources key in the Extra Properties map (refer to no-restype-option.png attached)

          try specifying the restype type:
          http://localhost:4848/management/domain/resources/list-jms-resources?id=&resType=javax.jms.Queue&__remove_empty_entries__=true
          Note that the jmsResources key is missing. (refer to restype-option.png attached)

          Show
          Anissa Lam added a comment - Another issue. #3. When --restype is specified, the 'jmsResources' is not included in the ExtraProperties thats returned in the action report. To reproduce, run %asadmin create-jms-resource --restype javax.jms.Queue TEST Now, go to browser, enter http://localhost:4848/management/domain/resources/list-jms-resources This has the jmsResources key in the Extra Properties map (refer to no-restype-option.png attached) try specifying the restype type: http://localhost:4848/management/domain/resources/list-jms-resources?id=&resType=javax.jms.Queue&__remove_empty_entries__=true Note that the jmsResources key is missing. (refer to restype-option.png attached)
          Hide
          Anissa Lam added a comment - - edited

          I have changed the summary since i found more issues with list-jms-resources command.

          #1. list-jms-resources doesn't filter out Admin Object Resources thats not using jmsra adapter
          This is described in previous comment.

          #2. list-jms-resources returns the connection-pool name if specifying "javax.jms.TopicConnectionFactory" as the restype option.

          Without specifying any restype in the option:

          %asadmin list-jms-resources
          jms/__defaultConnectionFactory
          ABC
          Command list-jms-resources executed successfully.

          But if i specify restype
          %asadmin list-jms-resources --restype javax.jms.TopicConnectionFactory
          ABC-Connection-Pool
          Command list-jms-resources executed successfully.

          It should have returned the resource name, "ABC" not the connection pool name.
          Here is whats in domain.xml:

          <connector-connection-pool max-pool-size="250" steady-pool-size="1" name="ABC-Connection-Pool" resource-adapter-name="jmsra" connection-definition-name="javax.jms.TopicConnectionFactory"></connector-connection-pool>
          <connector-resource pool-name="ABC-Connection-Pool" jndi-name="ABC"></connector-resource>

          Show
          Anissa Lam added a comment - - edited I have changed the summary since i found more issues with list-jms-resources command. #1. list-jms-resources doesn't filter out Admin Object Resources thats not using jmsra adapter This is described in previous comment. #2. list-jms-resources returns the connection-pool name if specifying "javax.jms.TopicConnectionFactory" as the restype option. Without specifying any restype in the option: %asadmin list-jms-resources jms/__defaultConnectionFactory ABC Command list-jms-resources executed successfully. But if i specify restype %asadmin list-jms-resources --restype javax.jms.TopicConnectionFactory ABC-Connection-Pool Command list-jms-resources executed successfully. It should have returned the resource name, "ABC" not the connection pool name. Here is whats in domain.xml: <connector-connection-pool max-pool-size="250" steady-pool-size="1" name="ABC-Connection-Pool" resource-adapter-name="jmsra" connection-definition-name="javax.jms.TopicConnectionFactory"></connector-connection-pool> <connector-resource pool-name="ABC-Connection-Pool" jndi-name="ABC"></connector-resource>

            People

            • Assignee:
              David Zhao
              Reporter:
              Anissa Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: