Como obter informações de datasource via jboss-cli.

  1. Conectando na console CLI.

    cd $JBOSS_HOME/bin
    ./jboss-cli.sh --connect --controller=IP:9999 --user=--password=

  2. Obtendo informações do datasource.

    /subsystem=datasources/data-source=<jndi_name>:read-resource

    {
    "outcome" => "success",
    "result" => {
    "allocation-retry" => undefined,
    "allocation-retry-wait-millis" => undefined,
    "allow-multiple-users" => false,
    "background-validation" => true,
    "background-validation-millis" => 3000000L,
    "blocking-timeout-wait-millis" => undefined,
    "check-valid-connection-sql" => "select 1 from dual",
    "connection-properties" => undefined,
    "connection-url" => "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=lnxvmdb01)(PORT=1521))(LOAD_BALANCE=NO)(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=INSTANCE01)))",
    "datasource-class" => undefined,
    "driver-class" => "oracle.jdbc.OracleDriver",
    "driver-name" => "oracle",
    "enabled" => true,
    "exception-sorter-class-name" => "org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter",
    "exception-sorter-properties" => undefined,
    "flush-strategy" => undefined,
    "idle-timeout-minutes" => undefined,
    "jndi-name" => "java:/EXAMPLE_DS",
    "jta" => true,
    "max-pool-size" => 100,
    "min-pool-size" => 20,
    "new-connection-sql" => "select 1 from dual",
    "password" => expression "${VAULT::EXAMPLE_DS::password::0101010101010101}",
    "pool-prefill" => true,
    "pool-use-strict-min" => true,
    "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" => "true",
    "transaction-isolation" => undefined,
    "url-delimiter" => undefined,
    "url-selector-strategy-class-name" => undefined,
    "use-ccm" => false,
    "use-fast-fail" => false,
    "use-java-context" => true,
    "use-try-lock" => undefined,
    "user-name" => "USER_DB",
    "valid-connection-checker-class-name" => "org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker",
    "valid-connection-checker-properties" => undefined,
    "validate-on-match" => false,
    "statistics" => {
    "jdbc" => undefined,
    "pool" => undefined
    }
    }
    }

Show Comments