1 Reply Latest reply on Feb 29, 2012 6:07 AM by maeste

    Unable to set datasource attribute flush-strategy via CLI

    dastraub

      We try to setup/change our datasources via scripts/CLI.

      Is there a way to change/set the attribute "flush-strategy" ?

       

      [standalone@localhost:9999 /] /subsystem=datasources/data-source=test:read-attribute(name=flush-strategy)

      {

          "outcome" => "success",

          "result" => "FailingConnectionOnly"

      }

       

      [standalone@localhost:9999 /] /subsystem=datasources/data-source=test:write-attribute(name=flush-strategy,value="EntirePool")

      {

          "outcome" => "failed",

          "failure-description" => "JBAS010448: Invalid parameter name: flush-strategy",

          "rolled-back" => true

      }

       

      In org.jboss.as.connector.pool.PoolConfigurationRWHandler.PoolConfigurationWriteHandler is no validator defined for this attribute :

       

      private static ParameterValidator getValidator(String attributeName) throws OperationFailedException {

       

        if (MAX_POOL_SIZE.getName().equals(attributeName)) {

           return intValidator;

        } else if ( MIN_POOL_SIZE.getName().equals(attributeName)) {

            return intValidator;

         } else if ( BLOCKING_TIMEOUT_WAIT_MILLIS.getName().equals(attributeName)) {

           return longValidator;

         } else if ( IDLETIMEOUTMINUTES.getName().equals(attributeName)) {

            return longValidator;

         } else if ( BACKGROUNDVALIDATION.getName().equals(attributeName)) {

            return boolValidator;

         } else if ( BACKGROUNDVALIDATIONMILLIS.getName().equals(attributeName)) {

            return longValidator;

         } else if ( POOL_PREFILL.getName().equals(attributeName)) {

            return boolValidator;

         } else if ( POOL_USE_STRICT_MIN.getName().equals(attributeName)) {

           return boolValidator;

         } else if ( USE_FAST_FAIL.getName().equals(attributeName)) {

           return boolValidator;

         } else {

           throw new OperationFailedException(new ModelNode().set(MESSAGES.invalidParameterName(attributeName)));  <-- Here we are

         }