Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-4394

ConnectionFactory factory-type is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1.1.Final
    • Fix Version/s: 7.1.2.Final (EAP)
    • Component/s: JMS
    • Labels:
      None

      Description

      User reported that he could not set the <factory-type> when creating a connection factory:

      <connection-factory name="RemoteConnectionFactory">
        <factory-type>XA_GENERIC</factory-type>
        <connectors>
          <connector-ref connector-name="netty"/>
        </connectors>
        <entries>
          <entry name="RemoteConnectionFactory"/>
          <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
        </entries>
        <ha>true</ha>
      </connection-factory>
      

      I am not sure to understand what is supposed to do this factory-type attribute...

      It is not correctly described in the connection-factory description in the CLI:

      [standalone@localhost:9999 /] /subsystem=messaging/hornetq-server=default/connection-factory=RemoteConnectionFactory/:read-resource-description
      ...
      "factory-type" => {
                      "description" => "The type of connection factory. 0 = jms cf, 1 = queue cf, 2 = topic cf, 3 = xa cf, 4 = xa queue cf, 5 = xa topic cf",
                      "type" => INT,
                      "nillable" => false,
                      "allowed" => [
                          undefined,
                          undefined,
                          undefined,
                          undefined,
                          undefined,
                          undefined
                      ],
                      "access-type" => "read-only",
                      "storage" => "runtime"
                  },
      ...
      

      The allowed values are not properly defined (code in MessagingDescriptions.getConnectionFactory(Locale) is bogus, I'll fix it...)

      I don't understand why it is defined as read only but in ConnectionFactoryAdd we try to set the factoryType based on the resolved CONNECTION_FACTORY_TYPE attribute. This attribute is not defined among the connection factory attributes and can not be set when creating a cf with the CLI.

      I don't understand why the "factory-type" model node is defined twice (in CommonAttributes and in MessagingDescriptions.getConnectionFactory(Locale)). To me, these 2 attributes are the same.

      I'll fix it with the expectation that it is valid for an user to set the type of connection factory (with or w/o XA, queue/topic/generic) when he adds one through configuration or the CLI. Does that sound correct?

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jmesnil Jeff Mesnil
                  Reporter:
                  jmesnil Jeff Mesnil
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: