Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source.
   * Copyright 2010, Red Hat, Inc., and individual contributors
   * as indicated by the @author tags. See the copyright.txt file in the
   * distribution for a full listing of individual contributors.
   *
   * This is free software; you can redistribute it and/or modify it
   * under the terms of the GNU Lesser General Public License as
   * published by the Free Software Foundation; either version 2.1 of
  * the License, or (at your option) any later version.
  *
  * This software is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this software; if not, write to the Free
  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  */
 package org.jboss.as.connector.subsystems.datasources;
 

Author(s):
@author Stefano Maestri
 
 class Constants {
 
     static final String DATASOURCES = "datasources";
 
     static final String DATA_SOURCE = "data-source";
 
     static final String XA_DATASOURCE = "xa-data-source";
 
     private static final String CONNECTION_URL_NAME = "connection-url";
 
     static final String JDBC_DRIVER_NAME = "jdbc-driver";
 
     private static final String DATASOURCE_DRIVER_CLASS_NAME = "driver-class";
 
     private static final String DATASOURCE_CLASS_NAME = "datasource-class";
 
     private static final String DATASOURCE_DRIVER_NAME = "driver-name";
 
     private static final String DRIVER_NAME_NAME = "driver-name";
 
     private static final String DRIVER_MODULE_NAME_NAME = "driver-module-name";
 
     private static final String DRIVER_MAJOR_VERSION_NAME = "driver-major-version";
 
     private static final String DRIVER_MINOR_VERSION_NAME = "driver-minor-version";
 
     private static final String DRIVER_CLASS_NAME_NAME = "driver-class-name";
 
     private static final String DRIVER_DATASOURCE_CLASS_NAME_NAME = "driver-datasource-class-name";
 
     private static final String DRIVER_XA_DATASOURCE_CLASS_NAME_NAME = "driver-xa-datasource-class-name";
 
     private static final String CONNECTION_PROPERTIES_NAME = "connection-properties";
 
     private static final String CONNECTION_PROPERTY_VALUE_NAME = "value";
 
     private static final String NEW_CONNECTION_SQL_NAME = "new-connection-sql";
 
     private static final String TRANSACTION_ISOLATION_NAME = "transaction-isolation";
 
     private static final String URL_DELIMITER_NAME = "url-delimiter";
 
     private static final String URL_SELECTOR_STRATEGY_CLASS_NAME_NAME = "url-selector-strategy-class-name";
 
     private static final String USE_JAVA_CONTEXT_NAME = "use-java-context";
 
     static final String POOLNAME_NAME = "pool-name";
 
     private static final String ENABLED_NAME = "enabled";
 
     private static final String JTA_NAME = "jta";
    private static final String JNDINAME_NAME = "jndi-name";
    private static final String ALLOCATION_RETRY_NAME = "allocation-retry";
    private static final String ALLOCATION_RETRY_WAIT_MILLIS_NAME = "allocation-retry-wait-millis";
    private static final String SETTXQUERYTIMEOUT_NAME = "set-tx-query-timeout";
    private static final String XA_RESOURCE_TIMEOUT_NAME = "xa-resource-timeout";
    private static final String QUERYTIMEOUT_NAME = "query-timeout";
    private static final String USETRYLOCK_NAME = "use-try-lock";
    private static final String USERNAME_NAME = "user-name";
    private static final String PASSWORD_NAME = "password";
    private static final String SECURITY_DOMAIN_NAME = "security-domain";
    private static final String SHAREPREPAREDSTATEMENTS_NAME = "share-prepared-statements";
    private static final String PREPAREDSTATEMENTSCACHESIZE_NAME = "prepared-statements-cache-size";
    private static final String TRACKSTATEMENTS_NAME = "track-statements";
    private static final String VALIDCONNECTIONCHECKERCLASSNAME_NAME = "valid-connection-checker-class-name";
    private static final String CHECKVALIDCONNECTIONSQL_NAME = "check-valid-connection-sql";
    private static final String VALIDATEONMATCH_NAME = "validate-on-match";
    private static final String SPY_NAME = "spy";
    private static final String USE_CCM_NAME = "use-ccm";
    private static final String STALECONNECTIONCHECKERCLASSNAME_NAME = "stale-connection-checker-class-name";
    private static final String EXCEPTIONSORTERCLASSNAME_NAME = "exception-sorter-class-name";
    private static final String XADATASOURCEPROPERTIES_NAME = "xa-datasource-properties";
    private static final String XADATASOURCEPROPERTIES_VALUE_NAME = "value";
    private static final String XADATASOURCECLASS_NAME = "xa-datasource-class";
    private static final String INTERLEAVING_NAME = "interleaving";
    private static final String NOTXSEPARATEPOOL_NAME = "no-tx-separate-pool";
    private static final String PAD_XID_NAME = "pad-xid";
    private static final String SAME_RM_OVERRIDE_NAME = "same-rm-override";
    private static final String WRAP_XA_RESOURCE_NAME = "wrap-xa-resource";
    private static final String EXCEPTIONSORTER_PROPERTIES_NAME = "exception-sorter-properties";
    private static final String STALECONNECTIONCHECKER_PROPERTIES_NAME = "stale-connection-checker-properties";
    private static final String VALIDCONNECTIONCHECKER_PROPERTIES_NAME = "valid-connection-checker-properties";
    private static final String REAUTHPLUGIN_CLASSNAME_NAME = "reauth-plugin-class-name";
    private static final String REAUTHPLUGIN_PROPERTIES_NAME = "reauth-plugin-properties";
    private static final String RECOVERY_USERNAME_NAME = "recovery-username";
    private static final String RECOVERY_PASSWORD_NAME = "recovery-password";
    private static final String RECOVERY_SECURITY_DOMAIN_NAME = "recovery-security-domain";
    private static final String RECOVER_PLUGIN_CLASSNAME_NAME = "recovery-plugin-class-name";
    private static final String RECOVER_PLUGIN_PROPERTIES_NAME = "recovery-plugin-properties";
    private static final String NO_RECOVERY_NAME = "no-recovery";
    static final String INSTALLED_DRIVERS = "installed-drivers";
    static final String DEPLOYMENT_NAME = "deployment-name";
    static final String MODULE_SLOT = "module-slot";
    static final String JDBC_COMPLIANT = "jdbc-compliant";
    static final String STATISTICS = "statistics";
        @Override
        public void validateParameter(String parameterNameModelNode valuethrows OperationFailedException {
            if (value.isDefined() && value.getType() != .) {
            String str = value.asString();
            if (! str.startsWith("java:/") && ! str.startsWith("java:jboss/")) {
                throw new OperationFailedException(new ModelNode().set("Jndi name have to start with java:/ or java:jboss/"));
            }
        }
        }
        @Override
        public void validateResolvedParameter(String parameterNameModelNode valuethrows OperationFailedException {
            //TODO implement validateResolvedParameter
            throw new UnsupportedOperationException();
        }
    });
New to GrepCode? Check out our FAQ X