Skip to content

Instantly share code, notes, and snippets.

@gaol
Created June 15, 2017 01:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaol/957a50e9c28b23a80d983a944a318e30 to your computer and use it in GitHub Desktop.
Save gaol/957a50e9c28b23a80d983a944a318e30 to your computer and use it in GitHub Desktop.
Example for query by nested resources
JBoss Mojo page: https://developer.jboss.org/wiki/ProposedRequirementsForImprovingQueryOperationForNestedChildResourcesAndComplexAttributes
Steps to create data source valid checker:
===
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-class-name,value=org.jboss.jca.adapters.jdbc.extensions.novendor.SQLExceptionValidConnectionChecker)
> :reload
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-properties, value={reason=>NoReason})
> :reload
Example command to query the DataSource which has the reason == NoReason:
===
> /subsystem=datasources/data-source=*:query(select=[valid-connection-checker-class-name], where={valid-connection-checker-properties.reason=NoReason})
> NOTE: the example command above is just a guess, it does not require the implementation must follow the format, as long as it provides the ability to query such result by the condition. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment