glassfish
  1. glassfish
  2. GLASSFISH-20999

description attribute on Topic doesn't get set

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1.1
    • Component/s: jms
    • Labels:
      None

      Description

      When setting the description attribute of a Topic via @JMSDestinationDefinition or glassfish-resources, it doesn't show either on the client or on the server when doing a toString of the Topic object.

        Activity

        Hide
        amyk added a comment - - edited

        Hi David, please evaluate this to see where the 'description' should be displayed for a JMSDestinationDefinition annotation as a GlassFish JMS resource. Neither Java EE specification nor JMS specification specifies this 'description' be a description for the associated JMS provider's Destination object, further JMS API javadoc only says following for Queue.toString() and Topic.toString(), hence this is not a bug in Topic.toString() from spec conformance point of view

        /** Returns a string representation of this object.
         *
         * @return the provider-specific identity values for this topic
         */
        
        Show
        amyk added a comment - - edited Hi David, please evaluate this to see where the 'description' should be displayed for a JMSDestinationDefinition annotation as a GlassFish JMS resource. Neither Java EE specification nor JMS specification specifies this 'description' be a description for the associated JMS provider's Destination object, further JMS API javadoc only says following for Queue.toString() and Topic.toString(), hence this is not a bug in Topic.toString() from spec conformance point of view /** Returns a string representation of this object. * * @return the provider-specific identity values for this topic */
        Hide
        David Zhao added a comment -

        The JMS admin objects created via admin console or asadmin can take and show the description property. But the property is not included in Queue.toString() either.

        Currently the JMS resources defined by annotations like @JMSDestinationDefinition are not shown in the admin gui although it is global scoped. So now the description property will not be seen anywhere in the admin gui, except it is in the codes to be as comments.

        To summarize it,

        1) It is same as normal JMS resources which are created traditionally that the description is not shown in the toString().
        2) If it is decided that the resources defined by annotations are shown in admin gui in the funture, then the description will appear there.

        Question to Amy,

        Should the description go to Queue.imqDestinationDescription?

        Show
        David Zhao added a comment - The JMS admin objects created via admin console or asadmin can take and show the description property. But the property is not included in Queue.toString() either. Currently the JMS resources defined by annotations like @JMSDestinationDefinition are not shown in the admin gui although it is global scoped. So now the description property will not be seen anywhere in the admin gui, except it is in the codes to be as comments. To summarize it, 1) It is same as normal JMS resources which are created traditionally that the description is not shown in the toString(). 2) If it is decided that the resources defined by annotations are shown in admin gui in the funture, then the description will appear there. Question to Amy, Should the description go to Queue.imqDestinationDescription?
        Hide
        amyk added a comment - - edited

        >Should the description go to Queue.imqDestinationDescription?

        Yes.

        Show
        amyk added a comment - - edited >Should the description go to Queue.imqDestinationDescription? Yes.
        Hide
        David Zhao added a comment -

        Update:

        create-jms-resource maps property Description to imqDestinationDescription, so it is included in dest.toString():

        Oracle GlassFish(tm) Server MQ Destination
        getName(): myQueue
        Class: com.sun.messaging.Queue
        getVERSION(): 3.0
        isReadonly(): false
        getProperties():

        {imqDestinationName=myQueue, imqDestinationDescription=abcde}

        create-admin-object is a JCA general command, so it doesn't do the property mapping for JMS. Admin console is using this command as REST endpoint too, so if the JMS destination is created in this way, the description will not be shown in dest.toString(). But the Description property might be stored in MQ destination's properties map, because it can be persisted/restored.

        @JMSDestinationDefinition doesn't map Description <-> imqDestinationDescription, so it is not included in toString().

        Show
        David Zhao added a comment - Update: create-jms-resource maps property Description to imqDestinationDescription, so it is included in dest.toString(): Oracle GlassFish(tm) Server MQ Destination getName(): myQueue Class: com.sun.messaging.Queue getVERSION(): 3.0 isReadonly(): false getProperties(): {imqDestinationName=myQueue, imqDestinationDescription=abcde} create-admin-object is a JCA general command, so it doesn't do the property mapping for JMS. Admin console is using this command as REST endpoint too, so if the JMS destination is created in this way, the description will not be shown in dest.toString(). But the Description property might be stored in MQ destination's properties map, because it can be persisted/restored. @JMSDestinationDefinition doesn't map Description <-> imqDestinationDescription, so it is not included in toString().

          People

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

            Dates

            • Created:
              Updated: