[jboss-jira] [JBoss JIRA] (WFLY-1893) Restarting server with a disabled DS enables the DS
Brian Stansberry (JIRA)
jira-events at lists.jboss.org
Mon Aug 19 10:44:27 EDT 2013
[ https://issues.jboss.org/browse/WFLY-1893?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797654#comment-12797654 ]
Brian Stansberry commented on WFLY-1893:
----------------------------------------
I commented on Kabir's initial PR re: getting the xsd and the DMR API consistent in terms of this "enabled" attribute.
Since this would involve a change in either the xsd or the DMR API, this should only be for WF and future EAP 7, not for EAP 6.x. So any fix that will need to be backported should be a workaround.
Now, for WF 8, ideally the xsd default for enabled should be true, and the DMR API default should match. Users who wish to use the CLI to add a DS but can't configure it in one operation should use the CLI "batch" functionality. My reasoning on this:
[09:25am] bstansberry: using batch is an API gesture to control how things occur
[09:25am] bstansberry: so is using :write-attribute(name=enabled,value=false)
[09:25am] bstansberry: batch is a standard gesture useful anywhere
[09:25am] bstansberry: enabled isn't
Changing this is a nice to have, not a blocker. But EAP 7 gives us a window to make this kind of change, so let's consider it.
Further note: if the reason more than one op is needed to configure something can be solved by adding optional params to the first op (e.g. /subsystem=datasources/data-source=x:add) which the handler uses to add steps to add in the children, then supporting that is a good thing to do.
> Restarting server with a disabled DS enables the DS
> ---------------------------------------------------
>
> Key: WFLY-1893
> URL: https://issues.jboss.org/browse/WFLY-1893
> Project: WildFly
> Issue Type: Bug
> Components: JCA
> Reporter: Kabir Khan
> Assignee: Stefano Maestri
>
> See https://issues.jboss.org/browse/WFLY-1874
> If you add a datasource with
> subsystem=datasources/data-source=Test:add(jndi-name=java:/Test,jta=false,use-ccm=false,connection-url=url,driver-class=org.h2.Driver,driver-name=h2,user-name=user,password=pass,validate-on-match=false,background-validation=false,share-prepared-statements=false)
> it shows up as not enabled/undefined:
> {code}
> [standalone at localhost:9990 /] /subsystem=datasources/data-source=Test:read-resource{ "outcome" => "success",
> "result" => {
> ...
> "enabled" => false,
> {code}
> {code}
> [standalone at localhost:9990 /] /subsystem=datasources/data-source=Test:read-resource(include-defaults=false)
> {
> "outcome" => "success",
> "result" => {
> ... "enabled" => undefined,
> {code}
> This is persisted as
> {code}
> <datasource jta="false" jndi-name="java:/Test" pool-name="Test" enabled="false" use-ccm="false">
> <connection-url>url</connection-url>
> <driver-class>org.h2.Driver</driver-class>
> <driver>h2</driver>
> <security>
> <user-name>user</user-name>
> <password>pass</password>
> </security>
> <validation>
> <validate-on-match>false</validate-on-match>
> <background-validation>false</background-validation>
> </validation>
> <statement>
> <share-prepared-statements>false</share-prepared-statements>
> </statement>
> </datasource>
> {code}
> Now if you stop and start the server again you end up with enabled=true.
--
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