]
Jay Kumar SenSharma commented on WFLY-2376:
-------------------------------------------
The Pull request [1] does not seems to be fixing the issue.
With the above pull request build still we see that if the class_name is not provided for
stale_connection, reauth_plugin and exception_sorter ....Still WildFly creates the
DataSource *Silently* without throwing any error / exception.
The DataSource configuration mentioned inside the "standalone.xml" still has
missing exception-sorter-properties, reauth-plugin-properties etc.
Ideally WildFly should have thrown some Error like following:
{code}
Caused by: javax.xml.stream.XMLStreamException: The exception-sorter-properties is defined
without defining the exception-sorter-class-name
at
org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.writeDS(DataSourcesExtension.java:510)
at
org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.writeContent(DataSourcesExtension.java:212)
at
org.jboss.as.connector.subsystems.datasources.DataSourcesExtension$DataSourceSubsystemParser.writeContent(DataSourcesExtension.java:193)
at org.jboss.as.server.parsing.StandaloneXml.writeServerProfile(StandaloneXml.java:1288)
[wildfly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:1205)
[wildfly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.as.server.parsing.StandaloneXml.writeContent(StandaloneXml.java:107)
[wildfly-server-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
at org.jboss.staxmapper.XMLMapperImpl.doDeparse(XMLMapperImpl.java:88)
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.deparseDocument(XMLMapperImpl.java:83)
[staxmapper-1.1.0.Final.jar:1.1.0.Final]
at
org.jboss.as.controller.persistence.AbstractConfigurationPersister.marshallAsXml(AbstractConfigurationPersister.java:117)
[wildfly-controller-8.0.1.Final-SNAPSHOT.jar:8.0.1.Final-SNAPSHOT]
... 28 more
{code}
[1]
DataSource properties are not persisting via CLI
------------------------------------------------
Key: WFLY-2376
URL:
https://issues.jboss.org/browse/WFLY-2376
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: JCA
Affects Versions: 8.0.0.Beta1
Reporter: Jay Kumar SenSharma
Assignee: Stefano Maestri
- 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 --user=admin --password=admin@123 -c
--controller=remote://localhost:9999
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.
./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\"})"
- 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}
--
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: