Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-1933

Disabled data-source without explicit enabled="false" in configuration xml file is re-enabled again after server reload

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 8.0.0.Alpha4
    • JCA
    • None

      The server automatically re-enables a data-source which was disabled before and which lost enabled="false" in the configuration XML file.

      There is a discrepancy between the default value of the enabled attribute in XSD and the same attribute definition in org.jboss.as.connector.subsystems.datasources.Constants. From my POV any data-source that has been disabled before should stay in that state unless it is explicitly enabled again. See https://bugzilla.redhat.com/show_bug.cgi?id=952277 for a reproducer.

      The culprit seems to be

      org.jboss.as.connector.subsystems.datasources.DsParser
      ...
          private void parseDataSource(final XMLExtendedStreamReader reader, final List<ModelNode> list, final ModelNode parentAddress) throws XMLStreamException, ParserException,
                  ValidateException {
      ...
      ==>        boolean enabled = Defaults.ENABLED.booleanValue();
      ...
          private void parseXADataSource(XMLExtendedStreamReader reader, final List<ModelNode> list, final ModelNode parentAddress) throws XMLStreamException, ParserException,
                  ValidateException {
      ...
      ==>        boolean enabled = Defaults.ENABLED.booleanValue();
      ...
      

      Though it looks like a bug, I am not sure we can change the default value in XSD for EAP.

            istudens@redhat.com Ivo Studensky
            istudens@redhat.com Ivo Studensky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: