[jboss-jira] [JBoss JIRA] (WFLY-1933) Disabled data-source without explicit enabled="false" in configuration xml file is re-enabled again after server reload

Ivo Studensky (JIRA) jira-events at lists.jboss.org
Fri Aug 23 06:43:26 EDT 2013


    [ https://issues.jboss.org/browse/WFLY-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798813#comment-12798813 ] 

Ivo Studensky commented on WFLY-1933:
-------------------------------------

The semantics under the {{PERSISTENT}} attribute of the {{enable}} operation should be reviewed again as it seems to be almost useless. The enable operation seems to be always called with {{persistent=true}}, see [1] [2]. Moreover, the result of the enable operation is always persisted despite the value of {{PERSISTENT}} attribute, see [3].

[1] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DsParser.java#L263

[2] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/Constants.java#L599

[3] https://github.com/wildfly/wildfly/blob/master/connector/src/main/java/org/jboss/as/connector/subsystems/datasources/DataSourceEnable.java#L86
                
> Disabled data-source without explicit enabled="false" in configuration xml file is re-enabled again after server reload
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-1933
>                 URL: https://issues.jboss.org/browse/WFLY-1933
>             Project: WildFly
>          Issue Type: Bug
>          Components: JCA
>    Affects Versions: 8.0.0.Alpha4
>            Reporter: Ivo Studensky
>            Assignee: Ivo Studensky
>
> 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 
> {code:java|title=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();
> ...
> {code}
> Though it looks like a bug, I am not sure we can change the default value in XSD for EAP.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list