Uploaded image for project: 'IronJacamar'
  1. IronJacamar
  2. JBJCA-902

Unwanted config properties in a connectiondefinition/adminobject from another connectiondefinition/adminobject in the same resource adapter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.0.13.Final, 1.1.0.Beta3
    • 1.0.12.Final, 1.1.0.Beta2
    • Common
    • None
    • Hide

      *) Create inside a resource adapter two connectiondefinitions/adminobjects:
      a) the first one with 2 system properties
      b) the seconf one with only one of the 2 system properties

      *) Put the logger for 'org.jboss.as.connector.deployers' at TRACE level

      *) Search in the server.log for strings starting with "CdMeta:"

      *) You'll see that there are some defaults matching the merge of the user specified connectiondefinitions/adminobjects (the order depends on which MSC threads completed the add operation of the config properties of the various definition)

      Show
      *) Create inside a resource adapter two connectiondefinitions/adminobjects: a) the first one with 2 system properties b) the seconf one with only one of the 2 system properties *) Put the logger for 'org.jboss.as.connector.deployers' at TRACE level *) Search in the server.log for strings starting with "CdMeta:" *) You'll see that there are some defaults matching the merge of the user specified connectiondefinitions/adminobjects (the order depends on which MSC threads completed the add operation of the config properties of the various definition)

      With the effects of issue AS7-5644 I noticed that the connection definition with missing system properties, instead of failing, was using properties from another connection definition (with a lot of consequent problems)

      After a lot of analysis the problem is that the org.jboss.jca.common.api.metadata.ra.Connector's system properties are polluted with the merged values of the user specified connectiondefinitions/adminobjects and these system properties's defaults are inserted in the user defined connectiondefinition/adminobject that don't define them.

      I think that the wrong operation is in the start method of org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterXmlDeploymentService.java:

      cmd = (new Merger()).mergeConnectorWithCommonIronJacamar(raxml, cmd);

      I think that merging should be between IronJacamar -> Connector and not raxml -> Connector:

      cmd = (new Merger()).mergeConnectorWithCommonIronJacamar(ijmd, cmd);

      After this change I see that the Connector is clean and no unwanted default are added inside my connectiondefinitions/adminobjects

      I'll attach the possible pull request.

              smaestri@redhat.com Stefano Maestri
              simone.gotti_jira Simone Gotti (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: