Bug 1023064 - DataSource properties are not persisting via CLI
Summary: DataSource properties are not persisting via CLI
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: JCA
Version: 6.1.1
Hardware: All
OS: All
high
high
Target Milestone: DR12
: EAP 6.4.0
Assignee: jboss-set
QA Contact: Martin Simka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 14:27 UTC by Jay SenSharma
Modified: 2019-08-19 12:44 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFCORE-216 0 Major Resolved Add ModelValidator to ensure resource model is correct 2018-08-17 16:57:21 UTC
Red Hat Issue Tracker WFLY-2376 0 Major Closed DataSource properties are not persisting via CLI 2018-08-17 16:57:21 UTC

Description Jay SenSharma 2013-10-24 14:27:25 UTC
Description of problem:
- The CLI command show that there are some valid configuration properties available like following while configuring DataSources, However those properties never get persisted in the DataSource configuration:

{quote}
 ./jboss-cli.sh -c command="/subsystem=datasources/data-source=testpool:read-resource-description(recursive=true)" 


            "stale-connection-checker-properties" => {
                "type" => OBJECT,
                "description" => "The stale connection checker properties",
                "expressions-allowed" => true,
                "nillable" => true,
                "value-type" => STRING,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
            "reauth-plugin-properties" => {
                "type" => OBJECT,
                "description" => "The properties for the reauthentication plugin",
                "expressions-allowed" => true,
                "nillable" => true,
                "value-type" => STRING,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
            "exception-sorter-properties" => {
                "type" => OBJECT,
                "description" => "The exception sorter properties",
                "expressions-allowed" => true,
                "nillable" => true,
                "value-type" => STRING,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
{quote}

- Following command never complains about any issue and the following command executed without any issue but the above properties are not persisted in the DataSource.

{quote}
 ./jboss-cli.sh --user=admin --password=admin@123 -c --controller=remote://localhost:9999 command="/subsystem=datasources/data-source=testpool:add(jndi-name=\"java:jboss/TestDS\",driver-name=\"ojdbc6.jar\",connection-url=\"jdbc:oracle:thin:@DBHostName:1521:DBName\",user-name=\"user\",password=\"pass\",new-connection-sql=\"select 1 from dual\", check-valid-connection-sql=\"select 2 from dual\",valid-connection-checker-class-name=\"org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker\",exception-sorter-properties={\"prop1\"=>\"value1\"},reauth-plugin-properties={\"reauthProp1\"=>\"reauthValue1\"},exception-sorter-properties={\"exceptionSorterProp1\"=>\"exceptionSorterValue1\"})"
{quote}


- The Generated DataSource looks like following:

${quote}
                <datasource jndi-name="java:jboss/TestDS" pool-name="testpool" enabled="true">
                    <connection-url>jdbc:oracle:thin:@DBHostName:1521:DBName</connection-url>
                    <driver>ojdbc6.jar</driver>
                    <new-connection-sql>select 1 from dual</new-connection-sql>
                    <security>
                        <user-name>user</user-name>
                        <password>pass</password>
                    </security>
                    <validation>
                        <valid-connection-checker class-name="org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker"/>
                        <check-valid-connection-sql>select 2 from dual</check-valid-connection-sql>
                    </validation>
                </datasource>
${quote}


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create datasource like following :
{quote}
 ./jboss-cli.sh --user=admin --password=admin@123 -c --controller=remote://localhost:9999 command="/subsystem=datasources/data-source=testpool:add(jndi-name=\"java:jboss/TestDS\",driver-name=\"ojdbc6.jar\",connection-url=\"jdbc:oracle:thin:@DBHostName:1521:DBName\",user-name=\"user\",password=\"pass\",new-connection-sql=\"select 1 from dual\", check-valid-connection-sql=\"select 2 from dual\",valid-connection-checker-class-name=\"org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker\",exception-sorter-properties={\"prop1\"=>\"value1\"},reauth-plugin-properties={\"reauthProp1\"=>\"reauthValue1\"},exception-sorter-properties={\"exceptionSorterProp1\"=>\"exceptionSorterValue1\"})"
{quote}

2. Check the generated datasource configuration


Actual results:


Expected results:


Additional info:

Comment 1 JBoss JIRA Server 2013-10-25 04:45:48 UTC
Jay Kumar SenSharma <jsenshar> made a comment on jira WFLY-2376

- Any of the concerned attribute like *"stale-connection-checker-properties"* or *"reauth-plugin-properties"* or *"exception-sorter-properties"* are not declared inside any of the following XSDs still CLI command shows that those are valid properties/tags

wildfly-8.0.0.Beta2-SNAPSHOT/docs/schema/wildfly-datasources_2_0.xsd
wildfly-8.0.0.Beta2-SNAPSHOT/docs/schema/jboss-as-datasources_1_0.xsd
wildfly-8.0.0.Beta2-SNAPSHOT/docs/schema/jboss-as-datasources_1_1.xsd

Comment 5 Martin Simka 2014-12-08 10:46:38 UTC
verified on EAP 6.4.0.DR12


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