Description of problem: CLI: data-source add --enable=true does not actually enable data source. Datasource is created in disabled state and must be enabled later. Version-Release number of selected component (if applicable): How reproducible: always. Steps to Reproduce: 1. data-source add --name=NoTxTradeDataSource --jndi-name=java:jboss/datasources/NoTxTradeDataSource --driver-name=h2 --connection-url=jdbc:h2:notxtrade.db:trade --enable Actual results: Datasource is not enabled. Expected results: Datasource should be enabled. Tested on 6.1.0 ER2.
https://community.jboss.org/message/636422#636422#636422
It seems thats intentional. There is the '--enabled' property. However its set as "read-only" atm, not sure why. It is accepted as valid data-source add parameter, but it does nothing.
I understand the arumentation that having ability to create datasource in two steps is valid in certain situation. However that does not mean that one step creation should not be possible in cases that there is no extra property or subresource to add. Anyway, if it is not to be supported at all (for which I still see no reason), the CLI should not have this option as well.
Either there is some assumption Im not aware or its broken. 1. --enabled=true is accepted in 'data-source add' but does nothing 2. cd subsystem=datasources/data-source=NoTxTradeDataSource :enable(persistent=false) Does not work, it fails in CLI, server side: - @Message(id = 10432, value = "Unable to start the ds because it generated more than one cf") 3. cd subsystem=datasources/data-source=NoTxTradeDataSource :enable(persistent=true) Works fine. From Maeste comment CLI should support this.
Ref JIRA.
Verified on EAP 6.1 ER4. There is a fix for AS7-6760 applied. The described problem won't be fixed.