Bug 920974 - CLI: data-source add --enable=true does not enable data source
Summary: CLI: data-source add --enable=true does not enable data source
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web Console
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER4
: EAP 6.1.0
Assignee: Stefano Maestri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-13 08:37 UTC by Dominik Pospisil
Modified: 2013-10-21 14:15 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-23 18:38:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker AS7-6760 0 Major Resolved Enabling data source fails if its not persistent 2017-01-06 00:33:51 UTC

Description Dominik Pospisil 2013-03-13 08:37:18 UTC
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.

Comment 2 baranowb 2013-03-19 13:01:31 UTC
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.

Comment 3 Dominik Pospisil 2013-03-19 13:10:32 UTC
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.

Comment 4 baranowb 2013-03-19 14:39:21 UTC
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.

Comment 5 baranowb 2013-03-20 11:20:01 UTC
Ref JIRA.

Comment 7 Vladimir Rastseluev 2013-04-05 12:36:57 UTC
Verified on EAP 6.1 ER4.
There is a fix for AS7-6760 applied.

The described problem won't be fixed.


Note You need to log in before you can comment on or make changes to this bug.