Examples of DsSecurityImpl


Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

        return properties;
    }

    public DsSecurity getSecurityFor(DatabaseMetaData dbMeta) throws ValidateException {
        Map<String, Object> config = dbMeta.getConfiguration();
        return new DsSecurityImpl( (String) config.get( "username" ), (String) config.get( "password" ), null, null );
    }
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

            case END_ELEMENT : {
               if (org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.forName(reader.getLocalName()) ==
                   org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.SECURITY)
               {

                  return new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
               }
               else
               {
                  if (DsSecurity.Tag.forName(reader.getLocalName()) == DsSecurity.Tag.UNKNOWN)
                  {
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

                    String username = getStringIfSetOrGetDefault(dataSourceNode, USERNAME, null);
                    String password = getStringIfSetOrGetDefault(dataSourceNode, PASSWORD, null);
                    String securityDomain = getStringIfSetOrGetDefault(dataSourceNode, SECURITY_DOMAIN, null);

                    DsSecurity security = new DsSecurityImpl(username, password, securityDomain);

                    boolean sharePreparedStatements = getBooleanIfSetOrGetDefault(dataSourceNode, USE_JAVA_CONTEXT, false);
                    Long preparedStatementsCacheSize = getLongIfSetOrGetDefault(dataSourceNode, PREPAREDSTATEMENTSCACHESIZE,
                            null);
                    TrackStatementsEnum trackStatements = dataSourceNode.hasDefined(TRACKSTATEMENTS) ? TrackStatementsEnum
                            .valueOf(dataSourceNode.get(TRACKSTATEMENTS).asString()) : TrackStatementsEnum.NOWARN;
                    Statement statement = new StatementImpl(sharePreparedStatements, preparedStatementsCacheSize,
                            trackStatements);

                    Integer allocationRetry = getIntIfSetOrGetDefault(dataSourceNode, ALLOCATION_RETRY, null);
                    Long allocationRetryWaitMillis = getLongIfSetOrGetDefault(dataSourceNode, ALLOCATION_RETRY_WAIT_MILLIS,
                            null);
                    Long blockingTimeoutMillis = getLongIfSetOrGetDefault(dataSourceNode, BLOCKING_TIMEOUT_WAIT_MILLIS, null);
                    Long idleTimeoutMinutes = getLongIfSetOrGetDefault(dataSourceNode, IDLETIMEOUTMINUTES, null);
                    Long queryTimeout = getLongIfSetOrGetDefault(dataSourceNode, QUERYTIMEOUT, null);
                    Integer xaResourceTimeout = getIntIfSetOrGetDefault(dataSourceNode, XA_RESOURCE_TIMEOUT, null);
                    Long useTryLock = getLongIfSetOrGetDefault(dataSourceNode, USETRYLOCK, null);
                    boolean setTxQuertTimeout = getBooleanIfSetOrGetDefault(dataSourceNode, SETTXQUERYTIMEOUT, false);
                    TimeOut timeOut = new TimeOutImpl(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetry,
                            allocationRetryWaitMillis, xaResourceTimeout, setTxQuertTimeout, queryTimeout, useTryLock);
                    TransactionIsolation transactionIsolation = dataSourceNode.has(TRANSACTION_ISOLOATION) ? TransactionIsolation
                            .valueOf(dataSourceNode.get(TRANSACTION_ISOLOATION).asString()) : null;
                    String checkValidConnectionSql = getStringIfSetOrGetDefault(dataSourceNode, CHECKVALIDCONNECTIONSQL, null);

                    JdbcAdapterExtension exceptionSorter = extractJdbcAdapterExtension(dataSourceNode,
                            EXCEPTIONSORTERCLASSNAME, EXCEPTIONSORTER_PROPERTIES);
                    JdbcAdapterExtension staleConnectionChecker = extractJdbcAdapterExtension(dataSourceNode,
                            STALECONNECTIONCHECKERCLASSNAME, STALECONNECTIONCHECKER_PROPERTIES);
                    JdbcAdapterExtension validConnectionChecker = extractJdbcAdapterExtension(dataSourceNode,
                            VALIDCONNECTIONCHECKERCLASSNAME, VALIDCONNECTIONCHECKER_PROPERTIES);

                    Long backgroundValidationMinutes = getLongIfSetOrGetDefault(dataSourceNode, BACKGROUNDVALIDATIONMINUTES,
                            null);
                    boolean backgroundValidation = getBooleanIfSetOrGetDefault(dataSourceNode, BACKGROUNDVALIDATION, false);
                    boolean useFastFail = getBooleanIfSetOrGetDefault(dataSourceNode, USE_FAST_FAIL, false);
                    boolean validateOnMatch = getBooleanIfSetOrGetDefault(dataSourceNode, VALIDATEONMATCH, false);
                    boolean spy = getBooleanIfSetOrGetDefault(dataSourceNode, SPY, false);
                    Validation validation = new ValidationImpl(backgroundValidation, backgroundValidationMinutes, useFastFail,
                            validConnectionChecker, checkValidConnectionSql, validateOnMatch, staleConnectionChecker,
                            exceptionSorter);
                    DataSource ds = new DataSourceImpl(connectionUrl, driverClass, module, transactionIsolation,
                            connectionProperties, timeOut, security, statement, validation, urlDelimiter,
                            urlSelectorStrategyClassName, newConnectionSql, useJavaContext, poolName, enabled, jndiName, spy,
                            pool);
                    datasourceList.add(ds);
                }
            }

            if (operation.hasDefined(XA_DATASOURCES)) {
                for (ModelNode dataSourceNode : operation.get(XA_DATASOURCES).asList()) {
                    Map<String, String> xaDataSourceProperty = new HashMap<String, String>(dataSourceNode
                            .get(XADATASOURCEPROPERTIES).asList().size());
                    for (ModelNode property : dataSourceNode.get(XADATASOURCEPROPERTIES).asList()) {
                        xaDataSourceProperty.put(property.asProperty().getName(), property.asString());
                    }
                    String xaDataSourceClass = getStringIfSetOrGetDefault(dataSourceNode, XADATASOURCECLASS, null);
                    String jndiName = getStringIfSetOrGetDefault(dataSourceNode, JNDINAME, null);
                    String module = getStringIfSetOrGetDefault(dataSourceNode, MODULE, null);
                    String newConnectionSql = getStringIfSetOrGetDefault(dataSourceNode, NEW_CONNECTION_SQL, null);
                    String poolName = getStringIfSetOrGetDefault(dataSourceNode, POOLNAME, null);
                    String urlDelimiter = getStringIfSetOrGetDefault(dataSourceNode, URL_DELIMITER, null);
                    String urlSelectorStrategyClassName = getStringIfSetOrGetDefault(dataSourceNode,
                            URL_SELECTOR_STRATEGY_CLASS_NAME, null);
                    boolean useJavaContext = getBooleanIfSetOrGetDefault(dataSourceNode, USE_JAVA_CONTEXT, false);
                    boolean enabled = getBooleanIfSetOrGetDefault(dataSourceNode, ENABLED, false);
                    Integer maxPoolSize = getIntIfSetOrGetDefault(dataSourceNode, MAX_POOL_SIZE, null);
                    Integer minPoolSize = getIntIfSetOrGetDefault(dataSourceNode, MIN_POOL_SIZE, null);
                    boolean prefill = getBooleanIfSetOrGetDefault(dataSourceNode, POOL_PREFILL, false);
                    boolean useStrictMin = getBooleanIfSetOrGetDefault(dataSourceNode, POOL_USE_STRICT_MIN, false);
                    boolean interleaving = getBooleanIfSetOrGetDefault(dataSourceNode, INTERLIVING, false);
                    boolean noTxSeparatePool = getBooleanIfSetOrGetDefault(dataSourceNode, NOTXSEPARATEPOOL, false);
                    boolean padXid = getBooleanIfSetOrGetDefault(dataSourceNode, PAD_XID, false);
                    boolean isSameRmOverride = getBooleanIfSetOrGetDefault(dataSourceNode, SAME_RM_OVERRIDE, false);
                    boolean wrapXaDataSource = getBooleanIfSetOrGetDefault(dataSourceNode, WRAP_XA_DATASOURCE, false);
                    CommonXaPool xaPool = new CommonXaPoolImpl(minPoolSize, maxPoolSize, prefill, useStrictMin,
                            isSameRmOverride, interleaving, padXid, wrapXaDataSource, noTxSeparatePool);

                    String username = getStringIfSetOrGetDefault(dataSourceNode, USERNAME, null);
                    String password = getStringIfSetOrGetDefault(dataSourceNode, PASSWORD, null);
                    String securityDomain = getStringIfSetOrGetDefault(dataSourceNode, SECURITY_DOMAIN, null);

                    DsSecurity security = new DsSecurityImpl(username, password, securityDomain);

                    boolean sharePreparedStatements = dataSourceNode.has(SHAREPREPAREDSTATEMENTS) ? dataSourceNode.get(
                            SHAREPREPAREDSTATEMENTS).asBoolean() : false;
                    Long preparedStatementsCacheSize = dataSourceNode.get(PREPAREDSTATEMENTSCACHESIZE).asLong();
                    TrackStatementsEnum trackStatements = TrackStatementsEnum.valueOf(dataSourceNode.get(TRACKSTATEMENTS)
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

            case END_ELEMENT : {
               if (org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.forName(reader.getLocalName()) ==
                   org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.SECURITY)
               {

                  return new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
               }
               else
               {
                  if (DsSecurity.Tag.forName(reader.getLocalName()) == DsSecurity.Tag.UNKNOWN)
                  {
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

    * @throws Exception exception
    */
   public LegacyTxDataSourceImpl buildDsSecurity(String userName, String password, String securityDomain,
         Extension reauthPlugin) throws Exception
   {
      security = new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
      return this;
   }
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

    * @throws Exception exception
    */
   public LegacyXaDataSourceImp buildDsSecurity(String userName, String password, String securityDomain,
         Extension reauthPlugin) throws Exception
   {
      security = new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
      return this;
   }
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

        final String password = getResolvedStringIfSetOrGetDefault(operationContext, dataSourceNode, PASSWORD, null);
        final String securityDomain = getStringIfSetOrGetDefault(dataSourceNode, SECURITY_DOMAIN, null);

        final Extension reauthPlugin = extractExtension(dataSourceNode, REAUTHPLUGIN_CLASSNAME, REAUTHPLUGIN_PROPERTIES);

        final DsSecurity security = new DsSecurityImpl(username, password, securityDomain, reauthPlugin);

        final boolean sharePreparedStatements = getBooleanIfSetOrGetDefault(dataSourceNode, SHAREPREPAREDSTATEMENTS, Defaults.SHARE_PREPARED_STATEMENTS);
        final Long preparedStatementsCacheSize = getLongIfSetOrGetDefault(dataSourceNode, PREPAREDSTATEMENTSCACHESIZE, null);
        final Statement.TrackStatementsEnum trackStatements = dataSourceNode.hasDefined(TRACKSTATEMENTS.getName()) ? Statement.TrackStatementsEnum
                .valueOf(dataSourceNode.get(TRACKSTATEMENTS.getName()).asString()) : Defaults.TRACK_STATEMENTS;
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

        final String password = getResolvedStringIfSetOrGetDefault(operationContext, dataSourceNode, PASSWORD, null);
        final String securityDomain = getStringIfSetOrGetDefault(dataSourceNode, SECURITY_DOMAIN, null);

        final Extension reauthPlugin = extractExtension(dataSourceNode, REAUTHPLUGIN_CLASSNAME, REAUTHPLUGIN_PROPERTIES);

        final DsSecurity security = new DsSecurityImpl(username, password, securityDomain, reauthPlugin);

        final boolean sharePreparedStatements = dataSourceNode.hasDefined(SHAREPREPAREDSTATEMENTS.getName()) ? dataSourceNode.get(
                SHAREPREPAREDSTATEMENTS.getName()).asBoolean() : Defaults.SHARE_PREPARED_STATEMENTS;
        final Long preparedStatementsCacheSize = getLongIfSetOrGetDefault(dataSourceNode, PREPAREDSTATEMENTSCACHESIZE, null);
        final Statement.TrackStatementsEnum trackStatements = dataSourceNode.hasDefined(TRACKSTATEMENTS.getName()) ? Statement.TrackStatementsEnum
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

    * @throws Exception exception
    */
   public LegacyXaDataSourceImp buildDsSecurity(String userName, String password, String securityDomain,
         Extension reauthPlugin) throws Exception
   {
      security = new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
      return this;
   }
View Full Code Here

Examples of org.jboss.jca.common.metadata.ds.DsSecurityImpl

            switch (reader.nextTag()) {
                case END_ELEMENT: {
                    if (org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.forName(reader.getLocalName()) ==
                            org.jboss.jca.common.api.metadata.ds.v10.DataSource.Tag.SECURITY) {

                        return new DsSecurityImpl(userName, password, securityDomain, reauthPlugin);
                    } else {
                        if (DsSecurity.Tag.forName(reader.getLocalName()) == DsSecurity.Tag.UNKNOWN) {
                            throw new ParserException(bundle.unexpectedEndTag(reader.getLocalName()));
                        }
                    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.