-
Bug
-
Resolution: Done
-
Critical
-
None
-
None
Create a (xa)datasource in admin console. Try to disable it using the appropriate button. This error will happen:
Request
{
"xa-datasource-class" => "org.h2.jdbcx.JdbcDataSource",
"pad-xid" => false,
"wrap-xa-resource" => false,
"same-rm-override" => false,
"interleaving" => false,
"name" => "qrh",
"driver-name" => "h2",
"password" => "",
"enabled" => true,
"user-name" => "",
"security-domain" => "",
"jndi-name" => "java:/uyyyy",
"pool-name" => "",
"transaction-isolation" => "",
"new-connection-sql" => "",
"connection-url" => "",
"driver-class" => "",
"valid-connection-checker-class-name" => "",
"check-valid-connection-sql" => "",
"background-validation" => false,
"background-validation-millis" => -1L,
"validate-on-match" => false,
"stale-connection-checker-class-name" => "",
"exception-sorter-class-name" => "",
"prepared-statements-cache-size" => -1L,
"share-prepared-statements" => false,
"use-ccm" => false,
"operation" => "disable",
"address" => [
("subsystem" => "datasources"),
("xa-data-source" => "qrh")
],
"operation-headers" => {"allow-resource-service-restart" => true}
}
Response
Internal Server Error
{
"outcome" => "failed",
"failure-description" => "JBAS010455: Data-source service [qrh] is not enabled",
"rolled-back" => true,
"response-headers" => {"process-state" => "restart-required"}
}
It states that "Data-source service [qrh] is not enabled" even though the datasource has property "enabled" equal "true".
After you disable the datasource in CLI using :disable operation (this works) and then enable it back -> from this point, disabling and enabling in console will work, just the first time (after creation) it doesn't.
Also, weird thing is - after you create a datasource, it is not shown in JNDI naming tree, it looks like it is not active, even though CLI says it is enabled. You have to reload server, only then will the datasource appear in JNDI naming tree - it behaves like datasource creation requires server-reload, but JCA subsystem doesn't indicate this.
What is the correct behavior?