Is there a CLI model that I can import to write typesafe scripts?
sboscarine Jan 15, 2013 8:52 PMAre there typesafe objects available that represent all the values avaiable when setting a DataSource...or any other JBoss domain objects? Surely you parse these comands to rich objects. Do you expose them to the users?
I want to write an installer for my application with compiler-safe attributes so that if JBoss changes their CLI model down the road, dropping or renaming an attribute, I can discover this via a compiler instead of at Runtime or by a user complaining.
When I run:
/subsystem=datasources/data-source=myDS:read-resource
I get:
[standalone@localhost:9999 /] /subsystem=datasources/data-source=myDS:read-resource
{
"outcome" => "success",
"result" => {
"allocation-retry" => undefined,
"allocation-retry-wait-millis" => undefined,
"allow-multiple-users" => undefined,
"background-validation" => undefined,
"background-validation-millis" => undefined,
"blocking-timeout-wait-millis" => undefined,
"check-valid-connection-sql" => "select 1 from dual",
"connection-properties" => undefined,
"connection-url" => "jdbc:oracle:thin:@localhost:1521:XE",
"datasource-class" => undefined,
"driver-class" => undefined,
"driver-name" => "oracle",
"enabled" => true,
"exception-sorter-class-name" => "org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter",
"exception-sorter-properties" => undefined,
"flush-strategy" => "FailingConnectionOnly",
"idle-timeout-minutes" => undefined,
"jndi-name" => "java:/drm-data_source",
"jta" => true,
"max-pool-size" => 50,
"min-pool-size" => 2,
"new-connection-sql" => undefined,
"password" => "sboscarine",
"pool-prefill" => undefined,
"pool-use-strict-min" => undefined,
"prepared-statements-cache-size" => undefined,
"query-timeout" => undefined,
"reauth-plugin-class-name" => undefined,
"reauth-plugin-properties" => undefined,
"security-domain" => undefined,
"set-tx-query-timeout" => false,
"share-prepared-statements" => false,
"spy" => false,
"stale-connection-checker-class-name" => undefined,
"stale-connection-checker-properties" => undefined,
"track-statements" => "NOWARN",
"transaction-isolation" => undefined,
"url-delimiter" => undefined,
"url-selector-strategy-class-name" => undefined,
"use-ccm" => true,
"use-fast-fail" => false,
"use-java-context" => false,
"use-try-lock" => undefined,
"user-name" => "sboscarine",
"valid-connection-checker-class-name" => undefined,
"valid-connection-checker-properties" => undefined,
"validate-on-match" => false,
"statistics" => {
"jdbc" => undefined,
"pool" => undefined
}
}
}
I'd love to have an enum or bean that represents these values. Are there any exposed to the users?
Thanks,
Steven